diff options
author | xjose93 <xjose93@hotmail.com> | 2013-04-27 19:56:40 +0200 |
---|---|---|
committer | xjose93 <xjose93@hotmail.com> | 2013-04-27 19:56:40 +0200 |
commit | a4201904722149b3188894cf1ef41e9f5c8b92a9 (patch) | |
tree | 8f586b1901930100eac6ba04a55ec966faad9072 /src | |
parent | 6dbd574a69071697788632db0d1a2dc662854a18 (diff) |
Core/Log: Add playerguid and mapnames when player still in world when its teleported.
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Handlers/MovementHandler.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/game/Handlers/MovementHandler.cpp b/src/server/game/Handlers/MovementHandler.cpp index f4c4b68524f..75d00a7da59 100644 --- a/src/server/game/Handlers/MovementHandler.cpp +++ b/src/server/game/Handlers/MovementHandler.cpp @@ -64,14 +64,15 @@ void WorldSession::HandleMoveWorldportAckOpcode() GetPlayer()->m_InstanceValid = true; Map* oldMap = GetPlayer()->GetMap(); + Map* newMap = sMapMgr->CreateMap(loc.GetMapId(), GetPlayer()); + if (GetPlayer()->IsInWorld()) { - sLog->outError(LOG_FILTER_NETWORKIO, "Player (Name %s) is still in world when teleported from map %u to new map %u", GetPlayer()->GetName().c_str(), oldMap->GetId(), loc.GetMapId()); + sLog->outError(LOG_FILTER_NETWORKIO, "Player %s (GUID: %u) is still in world when teleported from map %s (%u) to new map %s (%u)", GetPlayer()->GetName().c_str(), GUID_LOPART(GetPlayer()->GetGUID()), oldMap->GetMapName(), oldMap->GetId(), newMap ? newMap->GetMapName() : "Unknown", loc.GetMapId()); oldMap->RemovePlayerFromMap(GetPlayer(), false); } // relocate the player to the teleport destination - Map* newMap = sMapMgr->CreateMap(loc.GetMapId(), GetPlayer()); // the CanEnter checks are done in TeleporTo but conditions may change // while the player is in transit, for example the map may get full if (!newMap || !newMap->CanEnter(GetPlayer())) |