Core/Items: Implement azerite empowered items

Port From (https://github.com/TrinityCore/TrinityCore/commit/d934824421c83598853487c5cc9e4cbb3c5d0006)
This commit is contained in:
hondacrx
2019-12-05 22:55:44 -05:00
parent 86e1065da0
commit 5b9ad41953
47 changed files with 1050 additions and 239 deletions
@@ -99,4 +99,62 @@ namespace Game.Network.Packets
public uint AzeriteEssenceID;
public byte? Slot;
}
class AzeriteEmpoweredItemViewed : ClientPacket
{
public AzeriteEmpoweredItemViewed(WorldPacket packet) : base(packet) { }
public override void Read()
{
ItemGUID = _worldPacket.ReadPackedGuid();
}
public ObjectGuid ItemGUID;
}
class AzeriteEmpoweredItemSelectPower : ClientPacket
{
public AzeriteEmpoweredItemSelectPower(WorldPacket packet) : base(packet) { }
public override void Read()
{
Tier = _worldPacket.ReadInt32();
AzeritePowerID = _worldPacket.ReadInt32();
ContainerSlot = _worldPacket.ReadUInt8();
Slot = _worldPacket.ReadUInt8();
}
public int Tier;
public int AzeritePowerID;
public byte ContainerSlot;
public byte Slot;
}
class AzeriteEmpoweredItemEquippedStatusChanged : ServerPacket
{
public AzeriteEmpoweredItemEquippedStatusChanged() : base(ServerOpcodes.AzeriteEmpoweredItemEquippedStatusChanged) { }
public override void Write()
{
_worldPacket.WriteBit(IsHeartEquipped);
_worldPacket.FlushBits();
}
public bool IsHeartEquipped;
}
class AzeriteEmpoweredItemRespecOpen : ServerPacket
{
public AzeriteEmpoweredItemRespecOpen(ObjectGuid npcGuid) : base(ServerOpcodes.AzeriteEmpoweredItemRespecOpen)
{
NpcGUID = npcGuid;
}
public override void Write()
{
_worldPacket.WritePackedGuid(NpcGUID);
}
public ObjectGuid NpcGUID;
}
}
@@ -32,12 +32,12 @@ namespace Game.Network.Packets
public override void Read()
{
Type = (CollectionType)_worldPacket.ReadUInt32();
ID = _worldPacket.ReadUInt32();
Id = _worldPacket.ReadUInt32();
IsFavorite = _worldPacket.HasBit();
}
public CollectionType Type;
public uint ID;
public uint Id;
public bool IsFavorite;
}
}
@@ -340,7 +340,7 @@ namespace Game.Network.Packets
public void InitializeSplineData(MoveSpline moveSpline)
{
SplineData.ID = moveSpline.GetId();
SplineData.Id = moveSpline.GetId();
MovementSpline movementSpline = SplineData.Move;
MoveSplineFlag splineFlags = moveSpline.splineflags;
@@ -514,7 +514,7 @@ namespace Game.Network.Packets
_worldPacket.WriteBit(TransferSpellID.HasValue);
if (Ship.HasValue)
{
_worldPacket.WriteUInt32(Ship.Value.ID);
_worldPacket.WriteUInt32(Ship.Value.Id);
_worldPacket.WriteInt32(Ship.Value.OriginMapID);
}
@@ -531,7 +531,7 @@ namespace Game.Network.Packets
public struct ShipTransferPending
{
public uint ID; // gameobject_template.entry of the transport the player is teleporting on
public uint Id; // gameobject_template.entry of the transport the player is teleporting on
public int OriginMapID; // Map id the player is currently on (before teleport)
}
}
@@ -1320,7 +1320,7 @@ namespace Game.Network.Packets
public void Write(WorldPacket data)
{
data.WriteUInt32(ID);
data.WriteUInt32(Id);
data.WriteVector3(Destination);
data.WriteBit(CrzTeleport);
data.WriteBits(StopDistanceTolerance, 3);
@@ -1328,7 +1328,7 @@ namespace Game.Network.Packets
Move.Write(data);
}
public uint ID;
public uint Id;
public Vector3 Destination;
public bool CrzTeleport;
public byte StopDistanceTolerance; // Determines how far from spline destination the mover is allowed to stop in place 0, 0, 3.0, 2.76, numeric_limits<float>::max, 1.1, float(INT_MAX); default before this field existed was distance 3.0 (index 2)
+2 -2
View File
@@ -209,7 +209,7 @@ namespace Game.Network.Packets
public override void Write()
{
_worldPacket.WriteUInt32(ID);
_worldPacket.WriteUInt32(Id);
_worldPacket.WriteFloat(Pos.X);
_worldPacket.WriteFloat(Pos.Y);
_worldPacket.WriteUInt32(Icon);
@@ -220,7 +220,7 @@ namespace Game.Network.Packets
_worldPacket.WriteString(Name);
}
public uint ID;
public uint Id;
public uint Flags;
public Vector2 Pos;
public uint Icon;
+2 -2
View File
@@ -195,7 +195,7 @@ namespace Game.Network.Packets
{
public void Write(WorldPacket data)
{
data.WriteUInt32(ID);
data.WriteUInt32(Id);
data.WriteUInt32(NextPageID);
data.WriteInt32(PlayerConditionID);
data.WriteUInt8(Flags);
@@ -205,7 +205,7 @@ namespace Game.Network.Packets
data.WriteString(Text);
}
public uint ID;
public uint Id;
public uint NextPageID;
public int PlayerConditionID;
public byte Flags;
+3 -3
View File
@@ -217,7 +217,7 @@ namespace Game.Network.Packets
foreach (QuestObjective questObjective in Info.Objectives)
{
_worldPacket.WriteUInt32(questObjective.ID);
_worldPacket.WriteUInt32(questObjective.Id);
_worldPacket.WriteUInt8((byte)questObjective.Type);
_worldPacket.WriteInt8(questObjective.StorageIndex);
_worldPacket.WriteInt32(questObjective.ObjectID);
@@ -442,7 +442,7 @@ namespace Game.Network.Packets
foreach (QuestObjectiveSimple obj in Objectives)
{
_worldPacket.WriteUInt32(obj.ID);
_worldPacket.WriteUInt32(obj.Id);
_worldPacket.WriteInt32(obj.ObjectID);
_worldPacket.WriteInt32(obj.Amount);
_worldPacket.WriteUInt8(obj.Type);
@@ -1122,7 +1122,7 @@ namespace Game.Network.Packets
public struct QuestObjectiveSimple
{
public uint ID;
public uint Id;
public int ObjectID;
public int Amount;
public byte Type;
+4 -4
View File
@@ -151,7 +151,7 @@ namespace Game.Network.Packets
_worldPacket.WriteUInt32(ItemID);
break;
case TradeStatus.Initiated:
_worldPacket.WriteUInt32(ID);
_worldPacket.WriteUInt32(Id);
break;
case TradeStatus.Proposed:
_worldPacket.WritePackedGuid(Partner);
@@ -181,7 +181,7 @@ namespace Game.Network.Packets
public bool FailureForYou;
public InventoryResult BagResult;
public uint ItemID;
public uint ID;
public uint Id;
public bool PartnerIsSameBnetAccount;
}
@@ -192,7 +192,7 @@ namespace Game.Network.Packets
public override void Write()
{
_worldPacket.WriteUInt8(WhichPlayer);
_worldPacket.WriteUInt32(ID);
_worldPacket.WriteUInt32(Id);
_worldPacket.WriteUInt32(ClientStateIndex);
_worldPacket.WriteUInt32(CurrentStateIndex);
_worldPacket.WriteUInt64(Gold);
@@ -261,7 +261,7 @@ namespace Game.Network.Packets
public uint ClientStateIndex;
public List<TradeItem> Items = new List<TradeItem>();
public int CurrencyType;
public uint ID;
public uint Id;
public int ProposedEnchantment;
public int CurrencyQuantity;
}