Core/Logs: Added some more log informations to certain logs

This commit is contained in:
Lopin
2011-08-24 13:37:05 +02:00
parent 1965616baa
commit 0c410bda43
3 changed files with 11 additions and 7 deletions
+2 -2
View File
@@ -918,7 +918,7 @@ bool Player::Create(uint32 guidlow, CharacterCreateInfo* createInfo)
PlayerInfo const* info = sObjectMgr->GetPlayerInfo(createInfo->Race, createInfo->Class);
if (!info)
{
sLog->outError("Player have incorrect race/class pair. Can't be loaded.");
sLog->outError("Player (Name %s) have incorrect race/class pair (Race %u, Class %u). Can't be loaded.", createInfo->Race, createInfo->Class, m_name.c_str());
return false;
}
@@ -18141,7 +18141,7 @@ bool Player::_LoadHomeBind(PreparedQueryResult result)
PlayerInfo const *info = sObjectMgr->GetPlayerInfo(getRace(), getClass());
if (!info)
{
sLog->outError("Player have incorrect race/class pair. Can't be loaded.");
sLog->outError("Player (Name %s) have incorrect race/class pair (Race: %u, Class %u). Can't be loaded.", GetName(), getRace(), getClass());
return false;
}
+8 -4
View File
@@ -653,17 +653,21 @@ class ObjectMgr
PlayerClassInfo const* GetPlayerClassInfo(uint32 class_) const
{
if (class_ >= MAX_CLASSES) return NULL;
if (class_ >= MAX_CLASSES)
return NULL;
return &playerClassInfo[class_];
}
void GetPlayerClassLevelInfo(uint32 class_, uint8 level, PlayerClassLevelInfo* info) const;
PlayerInfo const* GetPlayerInfo(uint32 race, uint32 class_) const
{
if (race >= MAX_RACES) return NULL;
if (class_ >= MAX_CLASSES) return NULL;
if (race >= MAX_RACES)
return NULL;
if (class_ >= MAX_CLASSES)
return NULL;
PlayerInfo const* info = &playerInfo[race][class_];
if (info->displayId_m == 0 || info->displayId_f == 0) return NULL;
if (info->displayId_m == 0 || info->displayId_f == 0)
return NULL;
return info;
}
void GetPlayerLevelInfo(uint32 race, uint32 class_, uint8 level, PlayerLevelInfo* info) const;
@@ -67,7 +67,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
ASSERT(oldMap);
if (GetPlayer()->IsInWorld())
{
sLog->outCrash("Player is still in world when teleported from map %u! to new map %u", oldMap->GetId(), loc.GetMapId());
sLog->outCrash("Player (Name %s) is still in world when teleported from map %u to new map %u", GetPlayer()->GetName(), oldMap->GetId(), loc.GetMapId());
oldMap->Remove(GetPlayer(), false);
}