mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
*Fix a crash caused by possessed creatures. Thanks to Amit86
--HG-- branch : trunk
This commit is contained in:
@@ -278,16 +278,6 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
|
||||
movementInfo.t_seat = -1;
|
||||
}
|
||||
|
||||
// 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 */
|
||||
@@ -341,11 +331,18 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
|
||||
}
|
||||
else // creature charmed
|
||||
{
|
||||
if(Map *map = mover->GetMap())
|
||||
{
|
||||
map->CreatureRelocation((Creature*)mover, movementInfo.x, movementInfo.y, movementInfo.z, movementInfo.o);
|
||||
}
|
||||
mover->SetUnitMovementFlags(movementInfo.flags);
|
||||
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) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user