chore(Core/Logging): replace most server loggers (#5726)

* chore(Core/Logging): replace most server loggers

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
Kargatum
2021-06-21 08:07:12 +07:00
committed by GitHub
parent 9f80a592bb
commit 5787d00d54
199 changed files with 2312 additions and 4487 deletions

View File

@@ -48,8 +48,8 @@ void LoadSkillPerfectItemTable()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 spell perfection definitions. DB table `skill_perfect_item_template` is empty.");
LOG_INFO("server", " ");
LOG_INFO("server.loading", ">> Loaded 0 spell perfection definitions. DB table `skill_perfect_item_template` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -63,28 +63,28 @@ void LoadSkillPerfectItemTable()
if (!sSpellMgr->GetSpellInfo(spellId))
{
LOG_ERROR("server", "Skill perfection data for spell %u has non-existent spell id in `skill_perfect_item_template`!", spellId);
LOG_ERROR("sql.sql", "Skill perfection data for spell %u has non-existent spell id in `skill_perfect_item_template`!", spellId);
continue;
}
uint32 requiredSpecialization = fields[1].GetUInt32();
if (!sSpellMgr->GetSpellInfo(requiredSpecialization))
{
LOG_ERROR("server", "Skill perfection data for spell %u has non-existent required specialization spell id %u in `skill_perfect_item_template`!", spellId, requiredSpecialization);
LOG_ERROR("sql.sql", "Skill perfection data for spell %u has non-existent required specialization spell id %u in `skill_perfect_item_template`!", spellId, requiredSpecialization);
continue;
}
float perfectCreateChance = fields[2].GetFloat();
if (perfectCreateChance <= 0.0f)
{
LOG_ERROR("server", "Skill perfection data for spell %u has impossibly low proc chance in `skill_perfect_item_template`!", spellId);
LOG_ERROR("sql.sql", "Skill perfection data for spell %u has impossibly low proc chance in `skill_perfect_item_template`!", spellId);
continue;
}
uint32 perfectItemType = fields[3].GetUInt32();
if (!sObjectMgr->GetItemTemplate(perfectItemType))
{
LOG_ERROR("server", "Skill perfection data for spell %u references non-existent perfect item id %u in `skill_perfect_item_template`!", spellId, perfectItemType);
LOG_ERROR("sql.sql", "Skill perfection data for spell %u references non-existent perfect item id %u in `skill_perfect_item_template`!", spellId, perfectItemType);
continue;
}
@@ -97,8 +97,8 @@ void LoadSkillPerfectItemTable()
++count;
} while (result->NextRow());
LOG_INFO("server", ">> Loaded %u spell perfection definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server", " ");
LOG_INFO("server.loading", ">> Loaded %u spell perfection definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server.loading", " ");
}
struct SkillExtraItemEntry
@@ -134,8 +134,8 @@ void LoadSkillExtraItemTable()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 spell specialization definitions. DB table `skill_extra_item_template` is empty.");
LOG_INFO("server", " ");
LOG_INFO("server.loading", ">> Loaded 0 spell specialization definitions. DB table `skill_extra_item_template` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -149,28 +149,28 @@ void LoadSkillExtraItemTable()
if (!sSpellMgr->GetSpellInfo(spellId))
{
LOG_ERROR("server", "Skill specialization %u has non-existent spell id in `skill_extra_item_template`!", spellId);
LOG_ERROR("sql.sql", "Skill specialization %u has non-existent spell id in `skill_extra_item_template`!", spellId);
continue;
}
uint32 requiredSpecialization = fields[1].GetUInt32();
if (!sSpellMgr->GetSpellInfo(requiredSpecialization))
{
LOG_ERROR("server", "Skill specialization %u have not existed required specialization spell id %u in `skill_extra_item_template`!", spellId, requiredSpecialization);
LOG_ERROR("sql.sql", "Skill specialization %u have not existed required specialization spell id %u in `skill_extra_item_template`!", spellId, requiredSpecialization);
continue;
}
float additionalCreateChance = fields[2].GetFloat();
if (additionalCreateChance <= 0.0f)
{
LOG_ERROR("server", "Skill specialization %u has too low additional create chance in `skill_extra_item_template`!", spellId);
LOG_ERROR("sql.sql", "Skill specialization %u has too low additional create chance in `skill_extra_item_template`!", spellId);
continue;
}
int32 newMaxOrEntry = fields[3].GetInt32();
if (!newMaxOrEntry)
{
LOG_ERROR("server", "Skill specialization %u has 0 max number of extra items in `skill_extra_item_template`!", spellId);
LOG_ERROR("sql.sql", "Skill specialization %u has 0 max number of extra items in `skill_extra_item_template`!", spellId);
continue;
}
@@ -183,8 +183,8 @@ void LoadSkillExtraItemTable()
++count;
} while (result->NextRow());
LOG_INFO("server", ">> Loaded %u spell specialization definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server", " ");
LOG_INFO("server.loading", ">> Loaded %u spell specialization definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server.loading", " ");
}
bool CanCreatePerfectItem(Player* player, uint32 spellId, float& perfectCreateChance, uint32& perfectItemType)