diff options
author | megamage <none@none> | 2009-06-13 09:18:54 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-06-13 09:18:54 -0500 |
commit | ee9c12b48041884267c483ec1d5a197a9d9729ab (patch) | |
tree | ab220e68b73d4164fb8188ddf518b0eb57510e15 /src/game/Player.cpp | |
parent | 6b7964e3b437102c57dff3f96f16ba181334759a (diff) |
*Some fix of vehicles. Thanks to Seizerkiller.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r-- | src/game/Player.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 188a41f5b94..cd0cb336f64 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -1602,6 +1602,15 @@ uint8 Player::chatTag() const return 0; } +void Player::SendTeleportAckMsg() +{ + WorldPacket data(MSG_MOVE_TELEPORT_ACK, 41); + data.append(GetPackGUID()); + data << uint32(0); // this value increments every time + BuildMovementPacket(&data); + GetSession()->SendPacket(&data); +} + bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientation, uint32 options) { if(!MapManager::IsValidMapCoord(mapid, x, y, z, orientation)) @@ -1695,9 +1704,11 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati // near teleport, triggering send MSG_MOVE_TELEPORT_ACK from client at landing if(!GetSession()->PlayerLogout()) { - WorldPacket data; - BuildTeleportAckMsg(&data, x, y, z, orientation); - GetSession()->SendPacket(&data); + WorldLocation oldLoc; + GetPosition(oldLoc); + Relocate(x, y, z, orientation); + SendTeleportAckMsg(); + Relocate(oldLoc); } } else |