aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/MovementHandler.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp
index 072236af931..9088b1873fa 100644
--- a/src/game/MovementHandler.cpp
+++ b/src/game/MovementHandler.cpp
@@ -278,6 +278,17 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
movementInfo.t_seat = -1;
}
+ // Aura removal may remove mover
+ // fall damage generation (ignore in flight case that can be triggered also at lags in moment teleportation to another map).
+ if (opcode == MSG_MOVE_FALL_LAND && plMover && !plMover->isInFlight())
+ plMover->HandleFall(movementInfo);
+
+ if (plMover && ((movementInfo.flags & MOVEMENTFLAG_SWIMMING) != 0) != plMover->IsInWater())
+ {
+ // now client not include swimming flag in case jumping under water
+ plMover->SetInWater( !plMover->IsInWater() || plMover->GetBaseMap()->IsUnderWater(movementInfo.x, movementInfo.y, movementInfo.z) );
+ }
+
/*----------------------*/
/* process position-change */
@@ -331,19 +342,9 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
}
else // creature charmed
{
+ uint32 entry = mover->GetEntry();
mover->GetMap()->CreatureRelocation((Creature*)mover, movementInfo.x, movementInfo.y, movementInfo.z, movementInfo.o);
}
-
- // Aura removal may remove mover
- // fall damage generation (ignore in flight case that can be triggered also at lags in moment teleportation to another map).
- if (opcode == MSG_MOVE_FALL_LAND && plMover && !plMover->isInFlight())
- plMover->HandleFall(movementInfo);
-
- if (plMover && ((movementInfo.flags & MOVEMENTFLAG_SWIMMING) != 0) != plMover->IsInWater())
- {
- // now client not include swimming flag in case jumping under water
- plMover->SetInWater( !plMover->IsInWater() || plMover->GetBaseMap()->IsUnderWater(movementInfo.x, movementInfo.y, movementInfo.z) );
- }
}
void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recv_data)