Core/Logs: Added some more log informations to certain logs
This commit is contained in:
@@ -918,7 +918,7 @@ bool Player::Create(uint32 guidlow, CharacterCreateInfo* createInfo)
|
|||||||
PlayerInfo const* info = sObjectMgr->GetPlayerInfo(createInfo->Race, createInfo->Class);
|
PlayerInfo const* info = sObjectMgr->GetPlayerInfo(createInfo->Race, createInfo->Class);
|
||||||
if (!info)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -18141,7 +18141,7 @@ bool Player::_LoadHomeBind(PreparedQueryResult result)
|
|||||||
PlayerInfo const *info = sObjectMgr->GetPlayerInfo(getRace(), getClass());
|
PlayerInfo const *info = sObjectMgr->GetPlayerInfo(getRace(), getClass());
|
||||||
if (!info)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -653,17 +653,21 @@ class ObjectMgr
|
|||||||
|
|
||||||
PlayerClassInfo const* GetPlayerClassInfo(uint32 class_) const
|
PlayerClassInfo const* GetPlayerClassInfo(uint32 class_) const
|
||||||
{
|
{
|
||||||
if (class_ >= MAX_CLASSES) return NULL;
|
if (class_ >= MAX_CLASSES)
|
||||||
|
return NULL;
|
||||||
return &playerClassInfo[class_];
|
return &playerClassInfo[class_];
|
||||||
}
|
}
|
||||||
void GetPlayerClassLevelInfo(uint32 class_, uint8 level, PlayerClassLevelInfo* info) const;
|
void GetPlayerClassLevelInfo(uint32 class_, uint8 level, PlayerClassLevelInfo* info) const;
|
||||||
|
|
||||||
PlayerInfo const* GetPlayerInfo(uint32 race, uint32 class_) const
|
PlayerInfo const* GetPlayerInfo(uint32 race, uint32 class_) const
|
||||||
{
|
{
|
||||||
if (race >= MAX_RACES) return NULL;
|
if (race >= MAX_RACES)
|
||||||
if (class_ >= MAX_CLASSES) return NULL;
|
return NULL;
|
||||||
|
if (class_ >= MAX_CLASSES)
|
||||||
|
return NULL;
|
||||||
PlayerInfo const* info = &playerInfo[race][class_];
|
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;
|
return info;
|
||||||
}
|
}
|
||||||
void GetPlayerLevelInfo(uint32 race, uint32 class_, uint8 level, PlayerLevelInfo* info) const;
|
void GetPlayerLevelInfo(uint32 race, uint32 class_, uint8 level, PlayerLevelInfo* info) const;
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
|
|||||||
ASSERT(oldMap);
|
ASSERT(oldMap);
|
||||||
if (GetPlayer()->IsInWorld())
|
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);
|
oldMap->Remove(GetPlayer(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user