[8103] More wide use IsInWorld checks and delayed at teleport operations.

* IsInWorld used to prevent return unexpected not in world objects.
* Delayed operations need to process its in world state.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Ambal 2009-07-01 12:04:58 +04:00 committed by VladimirMangos
parent 9f41772828
commit 9f938a9ed4
17 changed files with 220 additions and 40 deletions

View file

@ -307,7 +307,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();
}
for (int i=0; i < PLAYER_MAX_BATTLEGROUND_QUEUES; ++i)
{