aboutsummaryrefslogtreecommitdiff
path: root/src/game/MovementHandler.cpp
diff options
context:
space:
mode:
authorXTZGZoReX <none@none>2010-01-13 18:24:23 +0100
committerXTZGZoReX <none@none>2010-01-13 18:24:23 +0100
commitf5998611c33670b9f77b4ca5382203c48f4ca63e (patch)
tree205edb66103fab54740ff9bfa57e2c60f68e4b10 /src/game/MovementHandler.cpp
parentf7ad3aefc8e63e87c29d5e9c169210f4e7e80ac8 (diff)
Backed out changeset: 52e769d95f14
--HG-- branch : trunk
Diffstat (limited to 'src/game/MovementHandler.cpp')
-rw-r--r--src/game/MovementHandler.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp
index da0387f8d1b..d4388f3c7a4 100644
--- a/src/game/MovementHandler.cpp
+++ b/src/game/MovementHandler.cpp
@@ -488,20 +488,18 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data)
uint64 guid;
recv_data >> guid;
- if(guid == GetPlayer()->m_mover->GetGUID())
- return;
-
- if(Unit *mover = ObjectAccessor::GetUnit(*GetPlayer(), guid))
- {
- GetPlayer()->SetMover(mover);
- if(mover != GetPlayer() && mover->canFly())
- {
- WorldPacket data(SMSG_MOVE_SET_CAN_FLY, 12);
- data.append(mover->GetPackGUID());
- data << uint32(0);
- SendPacket(&data);
- }
- }
+ if(GetPlayer()->IsInWorld())
+ if(Unit *mover = ObjectAccessor::GetUnit(*GetPlayer(), guid))
+ {
+ GetPlayer()->SetMover(mover);
+ if(mover != GetPlayer() && mover->canFly())
+ {
+ WorldPacket data(SMSG_MOVE_SET_CAN_FLY, 12);
+ data.append(mover->GetPackGUID());
+ data << uint32(0);
+ SendPacket(&data);
+ }
+ }
else
{
sLog.outError("HandleSetActiveMoverOpcode: incorrect mover guid: mover is " UI64FMTD " and should be " UI64FMTD, guid, _player->m_mover->GetGUID());