mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +00:00
chore(Core/ObjectMgr): Adjust a few comments/logs to reflect recent changes with stat handling. (#14759)
This commit is contained in:
@@ -3991,10 +3991,10 @@ void ObjectMgr::LoadPlayerInfo()
|
|||||||
|
|
||||||
PlayerClassInfo* pClassInfo = _playerClassInfo[class_];
|
PlayerClassInfo* pClassInfo = _playerClassInfo[class_];
|
||||||
|
|
||||||
// fatal error if no level 1 data
|
// fatal error if no initial level data
|
||||||
if (!pClassInfo->levelInfo || (pClassInfo->levelInfo[sWorld->getIntConfig(CONFIG_START_PLAYER_LEVEL) - 1].basehealth == 0 && class_ != CLASS_DEATH_KNIGHT) || (pClassInfo->levelInfo[sWorld->getIntConfig(CONFIG_START_HEROIC_PLAYER_LEVEL) - 1].basehealth == 0 && class_ == CLASS_DEATH_KNIGHT))
|
if (!pClassInfo->levelInfo || (pClassInfo->levelInfo[sWorld->getIntConfig(CONFIG_START_PLAYER_LEVEL) - 1].basehealth == 0 && class_ != CLASS_DEATH_KNIGHT) || (pClassInfo->levelInfo[sWorld->getIntConfig(CONFIG_START_HEROIC_PLAYER_LEVEL) - 1].basehealth == 0 && class_ == CLASS_DEATH_KNIGHT))
|
||||||
{
|
{
|
||||||
LOG_ERROR("sql.sql", "Class {} Level 1 does not have health/mana data!", class_);
|
LOG_ERROR("sql.sql", "Class {} initial level does not have health/mana data!", class_);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4003,7 +4003,7 @@ void ObjectMgr::LoadPlayerInfo()
|
|||||||
{
|
{
|
||||||
if ((pClassInfo->levelInfo[level].basehealth == 0 && class_ != CLASS_DEATH_KNIGHT) || (level >= sWorld->getIntConfig(CONFIG_START_HEROIC_PLAYER_LEVEL) && pClassInfo->levelInfo[level].basehealth == 0 && class_ == CLASS_DEATH_KNIGHT))
|
if ((pClassInfo->levelInfo[level].basehealth == 0 && class_ != CLASS_DEATH_KNIGHT) || (level >= sWorld->getIntConfig(CONFIG_START_HEROIC_PLAYER_LEVEL) && pClassInfo->levelInfo[level].basehealth == 0 && class_ == CLASS_DEATH_KNIGHT))
|
||||||
{
|
{
|
||||||
LOG_ERROR("sql.sql", "Class {} Level {} does not have health/mana data. Using stats data of level {}.", class_, level + 1, level);
|
LOG_ERROR("sql.sql", "Class {} level {} does not have health/mana data. Using stats data of level {}.", class_, level + 1, level);
|
||||||
pClassInfo->levelInfo[level] = pClassInfo->levelInfo[level - 1];
|
pClassInfo->levelInfo[level] = pClassInfo->levelInfo[level - 1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4125,10 +4125,10 @@ void ObjectMgr::LoadPlayerInfo()
|
|||||||
if (sWorld->getIntConfig(CONFIG_EXPANSION) < EXPANSION_WRATH_OF_THE_LICH_KING && class_ == CLASS_DEATH_KNIGHT)
|
if (sWorld->getIntConfig(CONFIG_EXPANSION) < EXPANSION_WRATH_OF_THE_LICH_KING && class_ == CLASS_DEATH_KNIGHT)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// fatal error if no level 1 data
|
// fatal error if no initial level data
|
||||||
if (!info->levelInfo || (info->levelInfo[sWorld->getIntConfig(CONFIG_START_PLAYER_LEVEL) - 1].stats[0] == 0 && class_ != CLASS_DEATH_KNIGHT) || (info->levelInfo[sWorld->getIntConfig(CONFIG_START_HEROIC_PLAYER_LEVEL) - 1].stats[0] == 0 && class_ == CLASS_DEATH_KNIGHT))
|
if (!info->levelInfo || (info->levelInfo[sWorld->getIntConfig(CONFIG_START_PLAYER_LEVEL) - 1].stats[0] == 0 && class_ != CLASS_DEATH_KNIGHT) || (info->levelInfo[sWorld->getIntConfig(CONFIG_START_HEROIC_PLAYER_LEVEL) - 1].stats[0] == 0 && class_ == CLASS_DEATH_KNIGHT))
|
||||||
{
|
{
|
||||||
LOG_ERROR("sql.sql", "Race {} Class {} initial level does not have stats data!", race, class_);
|
LOG_ERROR("sql.sql", "Race {} class {} initial level does not have stats data!", race, class_);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4137,7 +4137,7 @@ void ObjectMgr::LoadPlayerInfo()
|
|||||||
{
|
{
|
||||||
if ((info->levelInfo[level].stats[0] == 0 && class_ != CLASS_DEATH_KNIGHT) || (level >= sWorld->getIntConfig(CONFIG_START_HEROIC_PLAYER_LEVEL) && info->levelInfo[level].stats[0] == 0 && class_ == CLASS_DEATH_KNIGHT))
|
if ((info->levelInfo[level].stats[0] == 0 && class_ != CLASS_DEATH_KNIGHT) || (level >= sWorld->getIntConfig(CONFIG_START_HEROIC_PLAYER_LEVEL) && info->levelInfo[level].stats[0] == 0 && class_ == CLASS_DEATH_KNIGHT))
|
||||||
{
|
{
|
||||||
LOG_ERROR("sql.sql", "Race {} Class {} Level {} does not have stats data. Using stats data of level {}.", race, class_, level + 1, level);
|
LOG_ERROR("sql.sql", "Race {} class {} level {} does not have stats data. Using stats data of level {}.", race, class_, level + 1, level);
|
||||||
info->levelInfo[level] = info->levelInfo[level - 1];
|
info->levelInfo[level] = info->levelInfo[level - 1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4202,7 +4202,7 @@ void ObjectMgr::LoadPlayerInfo()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_INFO("server.loading", ">> Loaded {} Xp For Level Definitions in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
|
LOG_INFO("server.loading", ">> Loaded {} XP For Level Definitions in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||||
LOG_INFO("server.loading", " ");
|
LOG_INFO("server.loading", " ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user