Replace some MapManager::Instance().GetMap() calls with WorldObject::GetMap()

This commit is contained in:
hunuza 2008-11-16 12:11:45 +01:00
parent c37cfd0c2f
commit ac00eee418
23 changed files with 105 additions and 105 deletions

View file

@ -364,7 +364,7 @@ void WorldSession::LogoutPlayer(bool Save)
// the player may not be in the world when logging out
// e.g if he got disconnected during a transfer to another map
// calls to GetMap in this case may cause crashes
if(_player->IsInWorld()) MapManager::Instance().GetMap(_player->GetMapId(), _player)->Remove(_player, false);
if(_player->IsInWorld()) _player->GetMap()->Remove(_player, false);
// RemoveFromWorld does cleanup that requires the player to be in the accessor
ObjectAccessor::Instance().RemoveObject(_player);