[11074] Fix structure of MSG_MOVE_TELEPORT_ACK

This commit is contained in:
zergtmn 2011-01-27 00:31:39 +05:00
parent 6fbf464786
commit d30a757e86
3 changed files with 11 additions and 15 deletions

View file

@ -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