diff options
author | Aokromes <jipr@hotmail.com> | 2013-04-27 11:00:11 -0700 |
---|---|---|
committer | Aokromes <jipr@hotmail.com> | 2013-04-27 11:00:11 -0700 |
commit | 06e6d570ca9968f8ff6951541ad3cb2d6e1f43f5 (patch) | |
tree | f6a4196417dc2628517dcdfd88b9b965f0709ed4 /src | |
parent | 311a52c7233afc7f20b3f9ca9b931f0e5475c2b1 (diff) | |
parent | a4201904722149b3188894cf1ef41e9f5c8b92a9 (diff) |
Merge pull request #9725 from xjose93/ImproveLog7
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())) |