Core/PacketIO: Fixed wrong FlushBits usage (mostly related to string lengths)

This commit is contained in:
Shauren
2015-04-30 19:42:13 +02:00
parent 10a1aff63f
commit e0746e49b3
11 changed files with 53 additions and 14 deletions
@@ -176,8 +176,6 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Query::PlayerGuidLookupDa
data << uint8(lookupData.Level);
data.WriteString(lookupData.Name);
data.FlushBits();
return data;
}
@@ -210,6 +208,8 @@ WorldPacket const* WorldPackets::Query::QueryPageTextResponse::Write()
_worldPacket << Info.ID;
_worldPacket << Info.NextPageID;
_worldPacket.WriteBits(Info.Text.length(), 12);
_worldPacket.FlushBits();
_worldPacket.WriteString(Info.Text);
}
@@ -290,6 +290,7 @@ WorldPacket const* WorldPackets::Query::QueryGameObjectResponse::Write()
{
_worldPacket << GameObjectID;
_worldPacket.WriteBit(Allow);
_worldPacket.FlushBits();
if (Allow)
{