Core/PacketIO: Updated packet structures to 8.0.1
This commit is contained in:
@@ -29,7 +29,7 @@ void WorldPackets::Query::QueryCreature::Read()
|
||||
|
||||
WorldPacket const* WorldPackets::Query::QueryCreatureResponse::Write()
|
||||
{
|
||||
_worldPacket << CreatureID;
|
||||
_worldPacket << uint32(CreatureID);
|
||||
_worldPacket.WriteBit(Allow);
|
||||
|
||||
_worldPacket.FlushBits();
|
||||
@@ -61,7 +61,16 @@ WorldPacket const* WorldPackets::Query::QueryCreatureResponse::Write()
|
||||
_worldPacket << int32(Stats.CreatureFamily);
|
||||
_worldPacket << int32(Stats.Classification);
|
||||
_worldPacket.append(Stats.ProxyCreatureID.data(), Stats.ProxyCreatureID.size());
|
||||
_worldPacket.append(Stats.CreatureDisplayID.data(), Stats.CreatureDisplayID.size());
|
||||
_worldPacket << uint32(Stats.Display.CreatureDisplay.size());
|
||||
_worldPacket << float(Stats.Display.TotalProbability);
|
||||
|
||||
for (CreatureXDisplay const& display : Stats.Display.CreatureDisplay)
|
||||
{
|
||||
_worldPacket << uint32(display.CreatureDisplayID);
|
||||
_worldPacket << float(display.Scale);
|
||||
_worldPacket << float(display.Probability);
|
||||
}
|
||||
|
||||
_worldPacket << float(Stats.HpMulti);
|
||||
_worldPacket << float(Stats.EnergyMulti);
|
||||
_worldPacket << uint32(Stats.QuestItems.size());
|
||||
@@ -69,6 +78,7 @@ WorldPacket const* WorldPackets::Query::QueryCreatureResponse::Write()
|
||||
_worldPacket << int32(Stats.HealthScalingExpansion);
|
||||
_worldPacket << int32(Stats.RequiredExpansion);
|
||||
_worldPacket << int32(Stats.VignetteID);
|
||||
_worldPacket << int32(Stats.Class);
|
||||
|
||||
if (!Stats.Title.empty())
|
||||
_worldPacket << Stats.Title;
|
||||
@@ -79,8 +89,8 @@ WorldPacket const* WorldPackets::Query::QueryCreatureResponse::Write()
|
||||
if (!Stats.CursorName.empty())
|
||||
_worldPacket << Stats.CursorName;
|
||||
|
||||
for (int32 questItem : Stats.QuestItems)
|
||||
_worldPacket << questItem;
|
||||
if (!Stats.QuestItems.empty())
|
||||
_worldPacket.append(Stats.QuestItems.data(), Stats.QuestItems.size());
|
||||
}
|
||||
|
||||
return &_worldPacket;
|
||||
@@ -162,6 +172,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Query::PlayerGuidLookupDa
|
||||
data << lookupData.AccountID;
|
||||
data << lookupData.BnetAccountID;
|
||||
data << lookupData.GuidActual;
|
||||
data << uint64(lookupData.GuildClubMemberID);
|
||||
data << uint32(lookupData.VirtualRealmAddress);
|
||||
data << uint8(lookupData.Race);
|
||||
data << uint8(lookupData.Sex);
|
||||
@@ -174,7 +185,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Query::PlayerGuidLookupDa
|
||||
|
||||
WorldPacket const* WorldPackets::Query::QueryPlayerNameResponse::Write()
|
||||
{
|
||||
_worldPacket << Result;
|
||||
_worldPacket << uint8(Result);
|
||||
_worldPacket << Player;
|
||||
|
||||
if (Result == RESPONSE_SUCCESS)
|
||||
@@ -206,7 +217,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Query::QueryPageTextRespo
|
||||
|
||||
WorldPacket const* WorldPackets::Query::QueryPageTextResponse::Write()
|
||||
{
|
||||
_worldPacket << PageTextID;
|
||||
_worldPacket << uint32(PageTextID);
|
||||
_worldPacket.WriteBit(Allow);
|
||||
|
||||
_worldPacket.FlushBits();
|
||||
@@ -229,7 +240,7 @@ void WorldPackets::Query::QueryNPCText::Read()
|
||||
|
||||
WorldPacket const* WorldPackets::Query::QueryNPCTextResponse::Write()
|
||||
{
|
||||
_worldPacket << TextID;
|
||||
_worldPacket << uint32(TextID);
|
||||
_worldPacket.WriteBit(Allow);
|
||||
|
||||
_worldPacket.FlushBits();
|
||||
@@ -238,10 +249,8 @@ WorldPacket const* WorldPackets::Query::QueryNPCTextResponse::Write()
|
||||
|
||||
if (Allow)
|
||||
{
|
||||
for (uint32 i = 0; i < MAX_NPC_TEXT_OPTIONS; ++i)
|
||||
_worldPacket << Probabilities[i];
|
||||
for (uint32 i = 0; i < MAX_NPC_TEXT_OPTIONS; ++i)
|
||||
_worldPacket << BroadcastTextID[i];
|
||||
_worldPacket.append(Probabilities.data(), Probabilities.size());
|
||||
_worldPacket.append(BroadcastTextID.data(), BroadcastTextID.size());
|
||||
}
|
||||
|
||||
return &_worldPacket;
|
||||
@@ -276,8 +285,8 @@ WorldPacket const* WorldPackets::Query::QueryGameObjectResponse::Write()
|
||||
|
||||
statsData << float(Stats.Size);
|
||||
statsData << uint8(Stats.QuestItems.size());
|
||||
for (int32 questItem : Stats.QuestItems)
|
||||
statsData << int32(questItem);
|
||||
if (!Stats.QuestItems.empty())
|
||||
statsData.append(Stats.QuestItems.data(), Stats.QuestItems.size());
|
||||
|
||||
statsData << int32(Stats.RequiredLevel);
|
||||
}
|
||||
@@ -334,7 +343,7 @@ void WorldPackets::Query::QuestPOIQuery::Read()
|
||||
{
|
||||
_worldPacket >> MissingQuestCount;
|
||||
|
||||
for (uint8 i = 0; i < 50; ++i)
|
||||
for (std::size_t i = 0; i < MissingQuestPOIs.size(); ++i)
|
||||
_worldPacket >> MissingQuestPOIs[i];
|
||||
}
|
||||
|
||||
@@ -356,13 +365,12 @@ WorldPacket const* WorldPackets::Query::QuestPOIQueryResponse::Write()
|
||||
_worldPacket << int32(questPOIBlobData.QuestObjectiveID);
|
||||
_worldPacket << int32(questPOIBlobData.QuestObjectID);
|
||||
_worldPacket << int32(questPOIBlobData.MapID);
|
||||
_worldPacket << int32(questPOIBlobData.WorldMapAreaID);
|
||||
_worldPacket << int32(questPOIBlobData.Floor);
|
||||
_worldPacket << int32(questPOIBlobData.UiMapID);
|
||||
_worldPacket << int32(questPOIBlobData.Priority);
|
||||
_worldPacket << int32(questPOIBlobData.Flags);
|
||||
_worldPacket << int32(questPOIBlobData.WorldEffectID);
|
||||
_worldPacket << int32(questPOIBlobData.PlayerConditionID);
|
||||
_worldPacket << int32(questPOIBlobData.UnkWoD1);
|
||||
_worldPacket << int32(questPOIBlobData.SpawnTrackingID);
|
||||
_worldPacket << int32(questPOIBlobData.QuestPOIBlobPointStats.size());
|
||||
|
||||
for (QuestPOIBlobPoint const& questPOIBlobPoint : questPOIBlobData.QuestPOIBlobPointStats)
|
||||
@@ -381,13 +389,9 @@ WorldPacket const* WorldPackets::Query::QuestPOIQueryResponse::Write()
|
||||
|
||||
void WorldPackets::Query::QueryQuestCompletionNPCs::Read()
|
||||
{
|
||||
uint32 questCount = 0;
|
||||
|
||||
_worldPacket >> questCount;
|
||||
QuestCompletionNPCs.resize(questCount);
|
||||
|
||||
for (int32& QuestID : QuestCompletionNPCs)
|
||||
_worldPacket >> QuestID;
|
||||
QuestCompletionNPCs.resize(_worldPacket.read<uint32>());
|
||||
if (!QuestCompletionNPCs.empty())
|
||||
_worldPacket.read(QuestCompletionNPCs.data(), QuestCompletionNPCs.size());
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Query::QuestCompletionNPCResponse::Write()
|
||||
@@ -396,10 +400,9 @@ WorldPacket const* WorldPackets::Query::QuestCompletionNPCResponse::Write()
|
||||
for (auto& quest : QuestCompletionNPCs)
|
||||
{
|
||||
_worldPacket << int32(quest.QuestID);
|
||||
|
||||
_worldPacket << uint32(quest.NPCs.size());
|
||||
for (int32 const& npc : quest.NPCs)
|
||||
_worldPacket << int32(npc);
|
||||
if (!quest.NPCs.empty())
|
||||
_worldPacket.append(quest.NPCs.data(), quest.NPCs.size());
|
||||
}
|
||||
|
||||
return &_worldPacket;
|
||||
@@ -453,6 +456,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Query::ItemTextCache cons
|
||||
WorldPacket const* WorldPackets::Query::QueryItemTextResponse::Write()
|
||||
{
|
||||
_worldPacket.WriteBit(Valid);
|
||||
_worldPacket.FlushBits();
|
||||
_worldPacket << Item;
|
||||
_worldPacket << Id;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user