diff options
Diffstat (limited to 'src/server/game/Entities/Player')
| -rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 53 |
1 files changed, 50 insertions, 3 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 29d12953193..c12c3d60184 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -25720,9 +25720,56 @@ bool Player::SetHover(bool enable) void Player::SendMovementSetCanFly(bool apply) { - WorldPacket data(apply ? SMSG_MOVE_SET_CAN_FLY : SMSG_MOVE_UNSET_CAN_FLY, 12); - data.append(GetPackGUID()); - data << uint32(0); //! movement counter + ObjectGuid guid = GetGUID(); + WorldPacket data; + if (apply) + { + data.Initialize(SMSG_MOVE_SET_CAN_FLY, 1 + 8 + 4); + data.WriteBit(guid[1]); + data.WriteBit(guid[6]); + data.WriteBit(guid[5]); + data.WriteBit(guid[0]); + data.WriteBit(guid[7]); + data.WriteBit(guid[4]); + data.WriteBit(guid[2]); + data.WriteBit(guid[3]); + + data.WriteByteSeq(guid[6]); + data.WriteByteSeq(guid[3]); + + data << uint32(0); //! movement counter + + data.WriteByteSeq(guid[2]); + data.WriteByteSeq(guid[1]); + data.WriteByteSeq(guid[4]); + data.WriteByteSeq(guid[7]); + data.WriteByteSeq(guid[0]); + data.WriteByteSeq(guid[5]); + } + else + { + data.Initialize(SMSG_MOVE_UNSET_CAN_FLY, 1 + 8 + 4); + data.WriteBit(guid[1]); + data.WriteBit(guid[4]); + data.WriteBit(guid[2]); + data.WriteBit(guid[5]); + data.WriteBit(guid[0]); + data.WriteBit(guid[3]); + data.WriteBit(guid[6]); + data.WriteBit(guid[7]); + + data.WriteByteSeq(guid[4]); + data.WriteByteSeq(guid[6]); + + data << uint32(0); //! movement counter + + data.WriteByteSeq(guid[1]); + data.WriteByteSeq(guid[0]); + data.WriteByteSeq(guid[2]); + data.WriteByteSeq(guid[3]); + data.WriteByteSeq(guid[5]); + data.WriteByteSeq(guid[7]); + } SendDirectMessage(&data); } |
