CORE/Movement: Fix a potential crash with a player out of bounds. (#970)
This commit is contained in:
@@ -490,9 +490,11 @@ void WorldSession::HandleMovementOpcodes(WorldPacket & recvData)
|
|||||||
WorldSafeLocsEntry const* grave = sObjectMgr->GetClosestGraveyard(plrMover->GetPositionX(), plrMover->GetPositionY(), plrMover->GetPositionZ(), plrMover->GetMapId(), plrMover->GetTeamId());
|
WorldSafeLocsEntry const* grave = sObjectMgr->GetClosestGraveyard(plrMover->GetPositionX(), plrMover->GetPositionY(), plrMover->GetPositionZ(), plrMover->GetMapId(), plrMover->GetTeamId());
|
||||||
|
|
||||||
if (grave)
|
if (grave)
|
||||||
|
{
|
||||||
plrMover->TeleportTo(grave->map_id, grave->x, grave->y, grave->z, plrMover->GetOrientation());
|
plrMover->TeleportTo(grave->map_id, grave->x, grave->y, grave->z, plrMover->GetOrientation());
|
||||||
plrMover->Relocate(grave->x, grave->y, grave->z, plrMover->GetOrientation());
|
plrMover->Relocate(grave->x, grave->y, grave->z, plrMover->GetOrientation());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
plrMover->StopMovingOnCurrentPos(); // pussywizard: moving corpse can't release spirit
|
plrMover->StopMovingOnCurrentPos(); // pussywizard: moving corpse can't release spirit
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user