Fix crash when logging out in an instance while dead. Thanks @xoeo for pointing

Author: H0zen
This commit is contained in:
Antz 2016-06-30 07:49:48 +01:00 committed by Antz
parent ee9d27ad16
commit ad12885aee

View File

@ -4583,7 +4583,7 @@ void Player::RepopAtGraveyard()
if (ClosestGrave)
{
bool updateVisibility = IsInWorld() && GetMapId() == ClosestGrave->map_id;
TeleportTo(ClosestGrave->map_id, ClosestGrave->x, ClosestGrave->y, ClosestGrave->z, GetOrientation());
TeleportTo(ClosestGrave->map_id, ClosestGrave->x, ClosestGrave->y, ClosestGrave->z, GetOrientation(), 0, GetSession()->isLogingOut());
if (updateVisibility && IsInWorld())
{ UpdateVisibilityAndView(); }
}