CORE/Movement: Fix a potential crash with a player out of bounds. (#970)
This commit is contained in:
parent
db25b814e2
commit
d167890b3f
1 changed files with 5 additions and 3 deletions
|
|
@ -488,10 +488,12 @@ void WorldSession::HandleMovementOpcodes(WorldPacket & recvData)
|
|||
else if (!plrMover->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_IS_OUT_OF_BOUNDS))
|
||||
{
|
||||
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->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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue