mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 02:46:33 +01:00
[8103] More wide use IsInWorld checks and delayed at teleport operations. Author: Ambal
* IsInWorld used to prevent return unexpected not in world objects.
* Delayed operations need to process its in world state.
--HG--
branch : trunk
This commit is contained in:
@@ -310,7 +310,13 @@ void WorldSession::LogoutPlayer(bool Save)
|
||||
|
||||
///- Teleport to home if the player is in an invalid instance
|
||||
if(!_player->m_InstanceValid && !_player->isGameMaster())
|
||||
{
|
||||
_player->TeleportTo(_player->m_homebindMapId, _player->m_homebindX, _player->m_homebindY, _player->m_homebindZ, _player->GetOrientation());
|
||||
//this is a bad place to call for far teleport because we need player to be in world for successful logout
|
||||
//maybe we should implement delayed far teleport logout?
|
||||
while(_player->IsBeingTeleportedFar())
|
||||
HandleMoveWorldportAckOpcode();
|
||||
}
|
||||
|
||||
sOutdoorPvPMgr.HandlePlayerLeaveZone(_player,_player->GetZoneId());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user