mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
Core/Misc: Log Map name in asserts
(cherry picked from commit 991b2a11bd)
This commit is contained in:
@@ -17,8 +17,10 @@
|
||||
|
||||
#include "Position.h"
|
||||
#include "ByteBuffer.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "GridDefines.h"
|
||||
#include "Random.h"
|
||||
#include "World.h"
|
||||
|
||||
#include <G3D/g3dmath.h>
|
||||
#include <sstream>
|
||||
@@ -203,6 +205,7 @@ ByteBuffer& operator<<(ByteBuffer& buf, Position::ConstStreamer<Position::Packed
|
||||
std::string WorldLocation::GetDebugInfo() const
|
||||
{
|
||||
std::stringstream sstr;
|
||||
sstr << "MapID: " << m_mapId << " " << Position::ToString();
|
||||
MapEntry const* mapEntry = sMapStore.LookupEntry(m_mapId);
|
||||
sstr << "MapID: " << m_mapId << " Map name: '" << (mapEntry ? mapEntry->MapName[sWorld->GetDefaultDbcLocale()] : "<not found>") <<"' " << Position::ToString();
|
||||
return sstr.str();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user