Core/PacketIO: Updated packet structures to 11.0.5
Port From (https://github.com/TrinityCore/TrinityCore/commit/5f37b29f41b6cb3fbcc3dc6bc0cf3a25c1f7eb6a)
This commit is contained in:
@@ -698,6 +698,8 @@ namespace Game
|
|||||||
broadcastPingUnit.Type = pingUnit.Type;
|
broadcastPingUnit.Type = pingUnit.Type;
|
||||||
broadcastPingUnit.PinFrameID = pingUnit.PinFrameID;
|
broadcastPingUnit.PinFrameID = pingUnit.PinFrameID;
|
||||||
broadcastPingUnit.PingDuration = pingUnit.PingDuration;
|
broadcastPingUnit.PingDuration = pingUnit.PingDuration;
|
||||||
|
broadcastPingUnit.CreatureID = pingUnit.CreatureID;
|
||||||
|
broadcastPingUnit.SpellOverrideNameID = pingUnit.SpellOverrideNameID;
|
||||||
broadcastPingUnit.Write();
|
broadcastPingUnit.Write();
|
||||||
|
|
||||||
for (GroupReference itr = group.GetFirstMember(); itr != null; itr = itr.Next())
|
for (GroupReference itr = group.GetFirstMember(); itr != null; itr = itr.Next())
|
||||||
|
|||||||
@@ -477,7 +477,6 @@ namespace Game
|
|||||||
price -= MathFunctions.CalculatePct(price, priceMod);
|
price -= MathFunctions.CalculatePct(price, priceMod);
|
||||||
|
|
||||||
item.MuID = (int)slot + 1;
|
item.MuID = (int)slot + 1;
|
||||||
item.Durability = (int)itemTemplate.MaxDurability;
|
|
||||||
item.ExtendedCostID = (int)vendorItem.ExtendedCost;
|
item.ExtendedCostID = (int)vendorItem.ExtendedCost;
|
||||||
item.Type = (int)vendorItem.Type;
|
item.Type = (int)vendorItem.Type;
|
||||||
item.Quantity = leftInStock;
|
item.Quantity = leftInStock;
|
||||||
|
|||||||
@@ -609,16 +609,16 @@ namespace Game.Networking.Packets
|
|||||||
{
|
{
|
||||||
_worldPacket.WriteInt32(Items.Count);
|
_worldPacket.WriteInt32(Items.Count);
|
||||||
_worldPacket.WriteUInt32(Unknown830);
|
_worldPacket.WriteUInt32(Unknown830);
|
||||||
_worldPacket.WriteUInt32(TotalCount);
|
|
||||||
_worldPacket.WriteUInt32(DesiredDelay);
|
_worldPacket.WriteUInt32(DesiredDelay);
|
||||||
|
foreach (AuctionItem item in Items)
|
||||||
|
item.Write(_worldPacket);
|
||||||
|
|
||||||
_worldPacket.WriteBits((int)ListType, 2);
|
_worldPacket.WriteBits((int)ListType, 2);
|
||||||
_worldPacket.WriteBit(HasMoreResults);
|
_worldPacket.WriteBit(HasMoreResults);
|
||||||
_worldPacket.FlushBits();
|
_worldPacket.FlushBits();
|
||||||
|
|
||||||
BucketKey.Write(_worldPacket);
|
BucketKey.Write(_worldPacket);
|
||||||
|
_worldPacket.WriteUInt32(TotalCount);
|
||||||
foreach (AuctionItem item in Items)
|
|
||||||
item.Write(_worldPacket);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ namespace Game.Networking.Packets
|
|||||||
{
|
{
|
||||||
_worldPacket.WritePackedGuid(VendorGUID);
|
_worldPacket.WritePackedGuid(VendorGUID);
|
||||||
_worldPacket.WriteUInt32(Muid);
|
_worldPacket.WriteUInt32(Muid);
|
||||||
_worldPacket.WriteUInt8((byte)Reason);
|
_worldPacket.WriteUInt32((uint)Reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ObjectGuid VendorGUID;
|
public ObjectGuid VendorGUID;
|
||||||
|
|||||||
@@ -1241,7 +1241,7 @@ namespace Game.Networking.Packets
|
|||||||
|
|
||||||
public void Write(WorldPacket data)
|
public void Write(WorldPacket data)
|
||||||
{
|
{
|
||||||
data.WriteUInt16((ushort)MessageID);
|
data.WriteUInt32((uint)MessageID);
|
||||||
data.WriteUInt32(SequenceIndex);
|
data.WriteUInt32(SequenceIndex);
|
||||||
data.WriteBit(Speed.HasValue);
|
data.WriteBit(Speed.HasValue);
|
||||||
data.WriteBit(SpeedRange != null);
|
data.WriteBit(SpeedRange != null);
|
||||||
|
|||||||
@@ -145,14 +145,14 @@ namespace Game.Networking.Packets
|
|||||||
public override void Write()
|
public override void Write()
|
||||||
{
|
{
|
||||||
_worldPacket.WritePackedGuid(Vendor);
|
_worldPacket.WritePackedGuid(Vendor);
|
||||||
_worldPacket.WriteUInt8(Reason);
|
_worldPacket.WriteInt32(Reason);
|
||||||
_worldPacket.WriteInt32(Items.Count);
|
_worldPacket.WriteInt32(Items.Count);
|
||||||
|
|
||||||
foreach (VendorItemPkt item in Items)
|
foreach (VendorItemPkt item in Items)
|
||||||
item.Write(_worldPacket);
|
item.Write(_worldPacket);
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte Reason = 0;
|
public int Reason;
|
||||||
public List<VendorItemPkt> Items = new();
|
public List<VendorItemPkt> Items = new();
|
||||||
public ObjectGuid Vendor;
|
public ObjectGuid Vendor;
|
||||||
}
|
}
|
||||||
@@ -428,7 +428,6 @@ namespace Game.Networking.Packets
|
|||||||
data.WriteUInt64(Price);
|
data.WriteUInt64(Price);
|
||||||
data.WriteInt32(MuID);
|
data.WriteInt32(MuID);
|
||||||
data.WriteInt32(Type);
|
data.WriteInt32(Type);
|
||||||
data.WriteInt32(Durability);
|
|
||||||
data.WriteInt32(StackCount);
|
data.WriteInt32(StackCount);
|
||||||
data.WriteInt32(Quantity);
|
data.WriteInt32(Quantity);
|
||||||
data.WriteInt32(ExtendedCostID);
|
data.WriteInt32(ExtendedCostID);
|
||||||
@@ -446,7 +445,6 @@ namespace Game.Networking.Packets
|
|||||||
public ItemInstance Item = new();
|
public ItemInstance Item = new();
|
||||||
public int Quantity = -1;
|
public int Quantity = -1;
|
||||||
public ulong Price;
|
public ulong Price;
|
||||||
public int Durability;
|
|
||||||
public int StackCount;
|
public int StackCount;
|
||||||
public int ExtendedCostID;
|
public int ExtendedCostID;
|
||||||
public int PlayerConditionFailed;
|
public int PlayerConditionFailed;
|
||||||
|
|||||||
@@ -965,6 +965,8 @@ namespace Game.Networking.Packets
|
|||||||
public PingSubjectType Type = PingSubjectType.Max;
|
public PingSubjectType Type = PingSubjectType.Max;
|
||||||
public uint PinFrameID;
|
public uint PinFrameID;
|
||||||
public TimeSpan PingDuration;
|
public TimeSpan PingDuration;
|
||||||
|
public uint CreatureID;
|
||||||
|
public uint SpellOverrideNameID;
|
||||||
|
|
||||||
public SendPingUnit(WorldPacket packet) : base(packet) { }
|
public SendPingUnit(WorldPacket packet) : base(packet) { }
|
||||||
|
|
||||||
@@ -975,6 +977,14 @@ namespace Game.Networking.Packets
|
|||||||
Type = (PingSubjectType)_worldPacket.ReadUInt8();
|
Type = (PingSubjectType)_worldPacket.ReadUInt8();
|
||||||
PinFrameID = _worldPacket.ReadUInt32();
|
PinFrameID = _worldPacket.ReadUInt32();
|
||||||
PingDuration = TimeSpan.FromMilliseconds(_worldPacket.ReadInt32());
|
PingDuration = TimeSpan.FromMilliseconds(_worldPacket.ReadInt32());
|
||||||
|
|
||||||
|
bool hasCreatureID = _worldPacket.HasBit();
|
||||||
|
bool hasSpellOverrideNameID = _worldPacket.HasBit();
|
||||||
|
if (hasCreatureID)
|
||||||
|
CreatureID = _worldPacket.ReadUInt32();
|
||||||
|
|
||||||
|
if (hasSpellOverrideNameID)
|
||||||
|
SpellOverrideNameID = _worldPacket.ReadUInt32();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -985,6 +995,8 @@ namespace Game.Networking.Packets
|
|||||||
public PingSubjectType Type = PingSubjectType.Max;
|
public PingSubjectType Type = PingSubjectType.Max;
|
||||||
public uint PinFrameID;
|
public uint PinFrameID;
|
||||||
public TimeSpan PingDuration;
|
public TimeSpan PingDuration;
|
||||||
|
public uint? CreatureID;
|
||||||
|
public uint? SpellOverrideNameID;
|
||||||
|
|
||||||
public ReceivePingUnit() : base(ServerOpcodes.ReceivePingUnit) { }
|
public ReceivePingUnit() : base(ServerOpcodes.ReceivePingUnit) { }
|
||||||
|
|
||||||
@@ -995,6 +1007,15 @@ namespace Game.Networking.Packets
|
|||||||
_worldPacket.WriteUInt8((byte)Type);
|
_worldPacket.WriteUInt8((byte)Type);
|
||||||
_worldPacket.WriteUInt32(PinFrameID);
|
_worldPacket.WriteUInt32(PinFrameID);
|
||||||
_worldPacket.WriteInt32((int)PingDuration.TotalMilliseconds);
|
_worldPacket.WriteInt32((int)PingDuration.TotalMilliseconds);
|
||||||
|
_worldPacket.WriteBit(CreatureID.HasValue);
|
||||||
|
_worldPacket.WriteBit(SpellOverrideNameID.HasValue);
|
||||||
|
_worldPacket.FlushBits();
|
||||||
|
|
||||||
|
if (CreatureID.HasValue)
|
||||||
|
_worldPacket.WriteUInt32(CreatureID.Value);
|
||||||
|
|
||||||
|
if (SpellOverrideNameID.HasValue)
|
||||||
|
_worldPacket.WriteUInt32(SpellOverrideNameID.Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ namespace Game.Networking.Packets
|
|||||||
public int Price;
|
public int Price;
|
||||||
public long AvailableUntil;
|
public long AvailableUntil;
|
||||||
public bool Disabled;
|
public bool Disabled;
|
||||||
|
public bool Field_41;
|
||||||
|
|
||||||
public void Write(WorldPacket data)
|
public void Write(WorldPacket data)
|
||||||
{
|
{
|
||||||
@@ -28,6 +29,7 @@ namespace Game.Networking.Packets
|
|||||||
data.WriteInt32(Price);
|
data.WriteInt32(Price);
|
||||||
data.WriteInt64(AvailableUntil);
|
data.WriteInt64(AvailableUntil);
|
||||||
data.WriteBit(Disabled);
|
data.WriteBit(Disabled);
|
||||||
|
data.WriteBit(Field_41);
|
||||||
data.FlushBits();
|
data.FlushBits();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1155,7 +1155,7 @@ namespace Game.Networking.Packets
|
|||||||
{
|
{
|
||||||
Guid = _worldPacket.ReadPackedGuid();
|
Guid = _worldPacket.ReadPackedGuid();
|
||||||
CastID = _worldPacket.ReadPackedGuid();
|
CastID = _worldPacket.ReadPackedGuid();
|
||||||
MoveMsgID = _worldPacket.ReadUInt16();
|
MoveMsgID = _worldPacket.ReadUInt32();
|
||||||
SpellID = _worldPacket.ReadUInt32();
|
SpellID = _worldPacket.ReadUInt32();
|
||||||
Pitch = _worldPacket.ReadFloat();
|
Pitch = _worldPacket.ReadFloat();
|
||||||
Speed = _worldPacket.ReadFloat();
|
Speed = _worldPacket.ReadFloat();
|
||||||
@@ -1170,7 +1170,7 @@ namespace Game.Networking.Packets
|
|||||||
|
|
||||||
public ObjectGuid Guid;
|
public ObjectGuid Guid;
|
||||||
public ObjectGuid CastID;
|
public ObjectGuid CastID;
|
||||||
public ushort MoveMsgID;
|
public uint MoveMsgID;
|
||||||
public uint SpellID;
|
public uint SpellID;
|
||||||
public float Pitch;
|
public float Pitch;
|
||||||
public float Speed;
|
public float Speed;
|
||||||
@@ -1348,6 +1348,8 @@ namespace Game.Networking.Packets
|
|||||||
data.WriteInt32(AttackPower);
|
data.WriteInt32(AttackPower);
|
||||||
data.WriteInt32(SpellPower);
|
data.WriteInt32(SpellPower);
|
||||||
data.WriteUInt32(Armor);
|
data.WriteUInt32(Armor);
|
||||||
|
data.WriteInt32(Unknown_1105_1);
|
||||||
|
data.WriteInt32(Unknown_1105_2);
|
||||||
data.WriteBits(PowerData.Count, 9);
|
data.WriteBits(PowerData.Count, 9);
|
||||||
data.FlushBits();
|
data.FlushBits();
|
||||||
|
|
||||||
@@ -1363,6 +1365,8 @@ namespace Game.Networking.Packets
|
|||||||
int AttackPower;
|
int AttackPower;
|
||||||
int SpellPower;
|
int SpellPower;
|
||||||
uint Armor;
|
uint Armor;
|
||||||
|
int Unknown_1105_1;
|
||||||
|
int Unknown_1105_2;
|
||||||
List<SpellLogPowerData> PowerData = new();
|
List<SpellLogPowerData> PowerData = new();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user