mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 01:37:37 +01:00
Merge pull request #9732 from xjose93/ImproveLog9
Core/Logs: Add mapname at logging some info about loading bound instances
This commit is contained in:
@@ -18439,14 +18439,16 @@ void Player::_LoadBoundInstances(PreparedQueryResult result)
|
||||
bool deleteInstance = false;
|
||||
|
||||
MapEntry const* mapEntry = sMapStore.LookupEntry(mapId);
|
||||
std::string mapname = mapEntry ? mapEntry->name[sWorld->GetDefaultDbcLocale()] : "Unknown";
|
||||
|
||||
if (!mapEntry || !mapEntry->IsDungeon())
|
||||
{
|
||||
sLog->outError(LOG_FILTER_PLAYER, "_LoadBoundInstances: player %s(%d) has bind to not existed or not dungeon map %d", GetName().c_str(), GetGUIDLow(), mapId);
|
||||
sLog->outError(LOG_FILTER_PLAYER, "_LoadBoundInstances: player %s(%d) has bind to not existed or not dungeon map %d (%s)", GetName().c_str(), GetGUIDLow(), mapId, mapname.c_str());
|
||||
deleteInstance = true;
|
||||
}
|
||||
else if (difficulty >= MAX_DIFFICULTY)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_PLAYER, "_LoadBoundInstances: player %s(%d) has bind to not existed difficulty %d instance for map %u", GetName().c_str(), GetGUIDLow(), difficulty, mapId);
|
||||
sLog->outError(LOG_FILTER_PLAYER, "_LoadBoundInstances: player %s(%d) has bind to not existed difficulty %d instance for map %u (%s)", GetName().c_str(), GetGUIDLow(), difficulty, mapId, mapname.c_str());
|
||||
deleteInstance = true;
|
||||
}
|
||||
else
|
||||
@@ -18454,12 +18456,12 @@ void Player::_LoadBoundInstances(PreparedQueryResult result)
|
||||
MapDifficulty const* mapDiff = GetMapDifficultyData(mapId, Difficulty(difficulty));
|
||||
if (!mapDiff)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_PLAYER, "_LoadBoundInstances: player %s(%d) has bind to not existed difficulty %d instance for map %u", GetName().c_str(), GetGUIDLow(), difficulty, mapId);
|
||||
sLog->outError(LOG_FILTER_PLAYER, "_LoadBoundInstances: player %s(%d) has bind to not existed difficulty %d instance for map %u (%s)", GetName().c_str(), GetGUIDLow(), difficulty, mapId, mapname.c_str());
|
||||
deleteInstance = true;
|
||||
}
|
||||
else if (!perm && group)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_PLAYER, "_LoadBoundInstances: player %s(%d) is in group %d but has a non-permanent character bind to map %d, %d, %d", GetName().c_str(), GetGUIDLow(), GUID_LOPART(group->GetGUID()), mapId, instanceId, difficulty);
|
||||
sLog->outError(LOG_FILTER_PLAYER, "_LoadBoundInstances: player %s(%d) is in group %d but has a non-permanent character bind to map %d (%s), %d, %d", GetName().c_str(), GetGUIDLow(), GUID_LOPART(group->GetGUID()), mapId, mapname.c_str(), instanceId, difficulty);
|
||||
deleteInstance = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user