aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/MiscHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Handlers/MiscHandler.cpp')
-rw-r--r--src/server/game/Handlers/MiscHandler.cpp22
1 files changed, 4 insertions, 18 deletions
diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp
index 48ce07f3668..c1762421956 100644
--- a/src/server/game/Handlers/MiscHandler.cpp
+++ b/src/server/game/Handlers/MiscHandler.cpp
@@ -700,22 +700,8 @@ void WorldSession::HandlePlayedTime(WorldPackets::Character::RequestPlayedTime&
SendPacket(playedTime.Write());
}
-void WorldSession::HandleWorldTeleportOpcode(WorldPacket& recvData)
+void WorldSession::HandleWorldTeleportOpcode(WorldPackets::Misc::WorldTeleport& worldTeleport)
{
- uint32 time;
- uint32 mapid;
- float PositionX;
- float PositionY;
- float PositionZ;
- float Orientation;
-
- recvData >> time; // time in m.sec.
- recvData >> mapid;
- recvData >> PositionX;
- recvData >> PositionY;
- recvData >> PositionZ;
- recvData >> Orientation; // o (3.141593 = 180 degrees)
-
if (GetPlayer()->IsInFlight())
{
TC_LOG_DEBUG("network", "Player '%s' (%s) in flight, ignore worldport command.",
@@ -723,11 +709,11 @@ void WorldSession::HandleWorldTeleportOpcode(WorldPacket& recvData)
return;
}
- TC_LOG_DEBUG("network", "CMSG_WORLD_TELEPORT: Player = %s, Time = %u, map = %u, x = %f, y = %f, z = %f, o = %f",
- GetPlayer()->GetName().c_str(), time, mapid, PositionX, PositionY, PositionZ, Orientation);
+ TC_LOG_DEBUG("network", "CMSG_WORLD_TELEPORT: Player = %s, map = %u, x = %f, y = %f, z = %f, o = %f",
+ GetPlayer()->GetName().c_str(), worldTeleport.MapID, worldTeleport.Pos.x, worldTeleport.Pos.y, worldTeleport.Pos.z, worldTeleport.Facing);
if (HasPermission(rbac::RBAC_PERM_OPCODE_WORLD_TELEPORT))
- GetPlayer()->TeleportTo(mapid, PositionX, PositionY, PositionZ, Orientation);
+ GetPlayer()->TeleportTo(worldTeleport.MapID, worldTeleport.Pos.x, worldTeleport.Pos.y, worldTeleport.Pos.z, worldTeleport.Facing);
else
SendNotification(LANG_YOU_NOT_HAVE_PERMISSION);
}