mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 19:31:59 +01:00
Core/PacketIO: Fix SMSG_QUERY_NPC_TEXT_RESPONSE structure
This commit is contained in:
@@ -421,7 +421,7 @@ namespace WorldPackets
|
||||
{
|
||||
public:
|
||||
StandStateUpdate() : ServerPacket(SMSG_STAND_STATE_UPDATE, 4 + 1) { }
|
||||
StandStateUpdate(UnitStandStateType state) : ServerPacket(SMSG_STAND_STATE_UPDATE, 1), State(state) { }
|
||||
StandStateUpdate(UnitStandStateType state) : ServerPacket(SMSG_STAND_STATE_UPDATE, 4 + 1), State(state) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
|
||||
@@ -227,17 +227,18 @@ WorldPacket const* WorldPackets::Query::QueryNPCTextResponse::Write()
|
||||
_worldPacket << TextID;
|
||||
_worldPacket.WriteBit(Allow);
|
||||
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
_worldPacket << int32(Allow ? (MAX_NPC_TEXT_OPTIONS * (sizeof(float) + sizeof(uint32))) : 0);
|
||||
|
||||
if (Allow)
|
||||
{
|
||||
_worldPacket << int32(MAX_NPC_TEXT_OPTIONS * (4 + 4));
|
||||
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.FlushBits();
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user