mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/PacketIO: Updated packet structures to 11.0.5
This commit is contained in:
@@ -716,6 +716,8 @@ void WorldSession::HandleSendPingUnit(WorldPackets::Party::SendPingUnit const& p
|
||||
broadcastPingUnit.Type = pingUnit.Type;
|
||||
broadcastPingUnit.PinFrameID = pingUnit.PinFrameID;
|
||||
broadcastPingUnit.PingDuration = pingUnit.PingDuration;
|
||||
broadcastPingUnit.CreatureID = pingUnit.CreatureID;
|
||||
broadcastPingUnit.SpellOverrideNameID = pingUnit.SpellOverrideNameID;
|
||||
broadcastPingUnit.Write();
|
||||
|
||||
for (GroupReference const* itr = group->GetFirstMember(); itr != nullptr; itr = itr->next())
|
||||
|
||||
@@ -670,7 +670,6 @@ void WorldSession::SendListInventory(ObjectGuid vendorGuid)
|
||||
price -= CalculatePct(price, priceMod);
|
||||
|
||||
item.MuID = slot + 1; // client expects counting to start at 1
|
||||
item.Durability = itemTemplate->MaxDurability;
|
||||
item.ExtendedCostID = vendorItem->ExtendedCost;
|
||||
item.Type = vendorItem->Type;
|
||||
item.Quantity = leftInStock;
|
||||
|
||||
@@ -628,18 +628,22 @@ WorldPacket const* AuctionListBucketsResult::Write()
|
||||
|
||||
WorldPacket const* AuctionListItemsResult::Write()
|
||||
{
|
||||
_worldPacket << uint32(Items.size());
|
||||
_worldPacket << uint32(Unknown830);
|
||||
_worldPacket << uint32(TotalCount);
|
||||
_worldPacket << uint32(DesiredDelay);
|
||||
_worldPacket.WriteBits(AsUnderlyingType(ListType), 2);
|
||||
_worldPacket.WriteBit(HasMoreResults);
|
||||
_worldPacket.FlushBits();
|
||||
{
|
||||
_worldPacket << uint32(Items.size());
|
||||
_worldPacket << uint32(Unknown830);
|
||||
_worldPacket << uint32(DesiredDelay);
|
||||
for (AuctionItem const& item : Items)
|
||||
_worldPacket << item;
|
||||
}
|
||||
|
||||
_worldPacket << BucketKey;
|
||||
{
|
||||
_worldPacket.WriteBits(AsUnderlyingType(ListType), 2);
|
||||
_worldPacket.WriteBit(HasMoreResults);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
for (AuctionItem const& item : Items)
|
||||
_worldPacket << item;
|
||||
_worldPacket << BucketKey;
|
||||
_worldPacket << uint32(TotalCount);
|
||||
}
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ WorldPacket const* WorldPackets::Channel::UserlistUpdate::Write()
|
||||
_worldPacket << UpdatedUserGUID;
|
||||
_worldPacket << uint8(UserFlags);
|
||||
_worldPacket << uint32(_ChannelFlags);
|
||||
_worldPacket << uint32(ChannelID);
|
||||
_worldPacket << int32(ChannelID);
|
||||
_worldPacket.WriteBits(ChannelName.length(), 7);
|
||||
_worldPacket.FlushBits();
|
||||
_worldPacket.WriteString(ChannelName);
|
||||
|
||||
@@ -160,6 +160,8 @@ ByteBuffer& operator<<(ByteBuffer& data, SpellCastLogData const& spellCastLogDat
|
||||
data << int32(spellCastLogData.AttackPower);
|
||||
data << int32(spellCastLogData.SpellPower);
|
||||
data << int32(spellCastLogData.Armor);
|
||||
data << int32(spellCastLogData.Unknown_1105_1);
|
||||
data << int32(spellCastLogData.Unknown_1105_2);
|
||||
data << BitsSize<9>(spellCastLogData.PowerData);
|
||||
data.FlushBits();
|
||||
|
||||
|
||||
@@ -43,6 +43,8 @@ namespace WorldPackets
|
||||
int32 AttackPower = 0;
|
||||
int32 SpellPower = 0;
|
||||
int32 Armor = 0;
|
||||
int32 Unknown_1105_1 = 0;
|
||||
int32 Unknown_1105_2 = 0;
|
||||
std::vector<SpellLogPowerData> PowerData;
|
||||
|
||||
void Initialize(Unit const* unit);
|
||||
|
||||
@@ -48,7 +48,7 @@ WorldPacket const* WorldPackets::Item::BuyFailed::Write()
|
||||
{
|
||||
_worldPacket << VendorGUID;
|
||||
_worldPacket << uint32(Muid);
|
||||
_worldPacket << uint8(Reason);
|
||||
_worldPacket << int32(Reason);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
@@ -1050,7 +1050,7 @@ WorldPacket const* WorldPackets::Movement::ResumeToken::Write()
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Movement::MoveSetCompoundState::MoveStateChange const& stateChange)
|
||||
{
|
||||
data << uint16(stateChange.MessageID);
|
||||
data << uint32(stateChange.MessageID);
|
||||
data << uint32(stateChange.SequenceIndex);
|
||||
data.WriteBit(stateChange.Speed.has_value());
|
||||
data.WriteBit(stateChange.SpeedRange.has_value());
|
||||
|
||||
@@ -717,7 +717,7 @@ namespace WorldPackets
|
||||
{
|
||||
MoveStateChange(OpcodeServer messageId, uint32 sequenceIndex) : MessageID(messageId), SequenceIndex(sequenceIndex) { }
|
||||
|
||||
uint16 MessageID = 0;
|
||||
uint32 MessageID = 0;
|
||||
uint32 SequenceIndex = 0;
|
||||
Optional<float> Speed;
|
||||
Optional<MoveSetCompoundState::SpeedRange> SpeedRange;
|
||||
|
||||
@@ -141,7 +141,6 @@ ByteBuffer& operator<<(ByteBuffer& data, VendorItem const& item)
|
||||
data << uint64(item.Price);
|
||||
data << uint32(item.MuID);
|
||||
data << int32(item.Type);
|
||||
data << int32(item.Durability);
|
||||
data << int32(item.StackCount);
|
||||
data << int32(item.Quantity);
|
||||
data << int32(item.ExtendedCostID);
|
||||
@@ -159,7 +158,7 @@ ByteBuffer& operator<<(ByteBuffer& data, VendorItem const& item)
|
||||
WorldPacket const* VendorInventory::Write()
|
||||
{
|
||||
_worldPacket << Vendor;
|
||||
_worldPacket << uint8(Reason);
|
||||
_worldPacket << int32(Reason);
|
||||
_worldPacket << uint32(Items.size());
|
||||
for (VendorItem const& item : Items)
|
||||
_worldPacket << item;
|
||||
|
||||
@@ -168,7 +168,6 @@ namespace WorldPackets
|
||||
WorldPackets::Item::ItemInstance Item;
|
||||
int32 Quantity = -1;
|
||||
uint64 Price = 0;
|
||||
int32 Durability = 0;
|
||||
int32 StackCount = 0;
|
||||
int32 ExtendedCostID = 0;
|
||||
int32 PlayerConditionFailed = 0;
|
||||
@@ -184,7 +183,7 @@ namespace WorldPackets
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
uint8 Reason = 0;
|
||||
int32 Reason = 0;
|
||||
std::vector<VendorItem> Items;
|
||||
ObjectGuid Vendor;
|
||||
};
|
||||
|
||||
@@ -750,6 +750,13 @@ void WorldPackets::Party::SendPingUnit::Read()
|
||||
_worldPacket >> As<uint8>(Type);
|
||||
_worldPacket >> PinFrameID;
|
||||
_worldPacket >> PingDuration;
|
||||
_worldPacket >> OptionalInit(CreatureID);
|
||||
_worldPacket >> OptionalInit(SpellOverrideNameID);
|
||||
if (CreatureID)
|
||||
_worldPacket >> *CreatureID;
|
||||
|
||||
if (SpellOverrideNameID)
|
||||
_worldPacket >> *SpellOverrideNameID;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Party::ReceivePingUnit::Write()
|
||||
@@ -759,6 +766,15 @@ WorldPacket const* WorldPackets::Party::ReceivePingUnit::Write()
|
||||
_worldPacket << uint8(Type);
|
||||
_worldPacket << uint32(PinFrameID);
|
||||
_worldPacket << PingDuration;
|
||||
_worldPacket << OptionalInit(CreatureID);
|
||||
_worldPacket << OptionalInit(SpellOverrideNameID);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
if (CreatureID)
|
||||
_worldPacket << uint32(*CreatureID);
|
||||
|
||||
if (SpellOverrideNameID)
|
||||
_worldPacket << uint32(*SpellOverrideNameID);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
@@ -692,6 +692,8 @@ namespace WorldPackets
|
||||
PingSubjectType Type = PingSubjectType::Max;
|
||||
uint32 PinFrameID = 0;
|
||||
Duration<Milliseconds, int32> PingDuration;
|
||||
Optional<uint32> CreatureID;
|
||||
Optional<uint32> SpellOverrideNameID;
|
||||
};
|
||||
|
||||
class ReceivePingUnit final : public ServerPacket
|
||||
@@ -706,6 +708,8 @@ namespace WorldPackets
|
||||
PingSubjectType Type = PingSubjectType::Max;
|
||||
uint32 PinFrameID = 0;
|
||||
Duration<Milliseconds, int32> PingDuration;
|
||||
Optional<uint32> CreatureID;
|
||||
Optional<uint32> SpellOverrideNameID;
|
||||
};
|
||||
|
||||
class SendPingWorldPoint final : public ClientPacket
|
||||
|
||||
@@ -30,7 +30,8 @@ ByteBuffer& operator<<(ByteBuffer& data, PerksVendorItem const& perksVendorItem)
|
||||
data << int32(perksVendorItem.Field_18);
|
||||
data << int32(perksVendorItem.Price);
|
||||
data << perksVendorItem.AvailableUntil;
|
||||
data.WriteBit(perksVendorItem.Disabled);
|
||||
data << Bits<1>(perksVendorItem.Disabled);
|
||||
data << Bits<1>(perksVendorItem.Field_41);
|
||||
data.FlushBits();
|
||||
|
||||
return data;
|
||||
|
||||
@@ -34,6 +34,7 @@ struct PerksVendorItem
|
||||
int32 Price = 0;
|
||||
Timestamp<> AvailableUntil;
|
||||
bool Disabled = false;
|
||||
bool Field_41 = false;
|
||||
};
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, PerksVendorItem const& perksVendorItem);
|
||||
|
||||
@@ -1051,7 +1051,7 @@ namespace WorldPackets
|
||||
|
||||
ObjectGuid Guid;
|
||||
ObjectGuid CastID;
|
||||
uint16 MoveMsgID = 0;
|
||||
uint32 MoveMsgID = 0;
|
||||
int32 SpellID = 0;
|
||||
float Pitch = 0.0f;
|
||||
float Speed = 0.0f;
|
||||
|
||||
@@ -1333,6 +1333,7 @@ void OpcodeTable::InitializeServerOpcodes()
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_DEFENSE_MESSAGE, STATUS_NEVER, CONNECTION_TYPE_REALM);
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_DELETE_CHAR, STATUS_NEVER, CONNECTION_TYPE_REALM);
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_DELETE_EXPIRED_MISSIONS_RESULT, STATUS_UNHANDLED, CONNECTION_TYPE_INSTANCE);
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_DELVES_ACCOUNT_DATA_ELEMENT_CHANGED, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_DESTROY_ARENA_UNIT, STATUS_NEVER, CONNECTION_TYPE_REALM);
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_DESTRUCTIBLE_BUILDING_DAMAGE, STATUS_NEVER, CONNECTION_TYPE_INSTANCE);
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_DIFFERENT_INSTANCE_FROM_PARTY, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
|
||||
|
||||
Reference in New Issue
Block a user