From d30a757e868ee901fc7546ed3348110cb241785b Mon Sep 17 00:00:00 2001 From: zergtmn Date: Thu, 27 Jan 2011 00:31:39 +0500 Subject: [PATCH] [11074] Fix structure of MSG_MOVE_TELEPORT_ACK --- src/game/Player.cpp | 22 +++++++++------------- src/game/Player.h | 2 +- src/shared/revision_nr.h | 2 +- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 5ee40b139..90e21b7cf 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -1815,7 +1815,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati if(!GetSession()->PlayerLogout()) { WorldPacket data; - BuildTeleportAckMsg(&data, x, y, z, orientation); + BuildTeleportAckMsg(data, x, y, z, orientation); GetSession()->SendPacket(&data); } } @@ -22422,19 +22422,15 @@ void Player::SendClearCooldown( uint32 spell_id, Unit* target ) SendDirectMessage(&data); } -void Player::BuildTeleportAckMsg( WorldPacket *data, float x, float y, float z, float ang ) const +void Player::BuildTeleportAckMsg(WorldPacket& data, float x, float y, float z, float ang) const { - data->Initialize(MSG_MOVE_TELEPORT_ACK, 41); - *data << GetPackGUID(); - *data << uint32(0); // this value increments every time - *data << uint32(m_movementInfo.GetMovementFlags()); // movement flags - *data << uint16(0); // 2.3.0 - *data << uint32(WorldTimer::getMSTime()); // time - *data << x; - *data << y; - *data << z; - *data << ang; - *data << uint32(0); + MovementInfo mi = m_movementInfo; + mi.ChangePosition(x, y, z, ang); + + data.Initialize(MSG_MOVE_TELEPORT_ACK, 64); + data << GetPackGUID(); + data << uint32(0); // this value increments every time + data << mi; } bool Player::HasMovementFlag( MovementFlags f ) const diff --git a/src/game/Player.h b/src/game/Player.h index cb7b6157b..bc4c0b504 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -2230,7 +2230,7 @@ class MANGOS_DLL_SPEC Player : public Unit } void HandleFall(MovementInfo const& movementInfo); - void BuildTeleportAckMsg( WorldPacket *data, float x, float y, float z, float ang) const; + void BuildTeleportAckMsg(WorldPacket& data, float x, float y, float z, float ang) const; bool isMoving() const { return m_movementInfo.HasMovementFlag(movementFlagsMask); } bool isMovingOrTurning() const { return m_movementInfo.HasMovementFlag(movementOrTurningFlagsMask); } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 0e47a26a1..63af807df 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11073" + #define REVISION_NR "11074" #endif // __REVISION_NR_H__