Core/Misc: Log Map name in asserts

This commit is contained in:
jackpoz
2019-05-06 21:00:59 +02:00
parent 4130384f2e
commit 991b2a11bd

View File

@@ -222,6 +222,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->name[sWorld->GetDefaultDbcLocale()] : "<not found>") <<"' " << Position::ToString();
return sstr.str();
}