mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 06:06:23 +00:00
feat(Core/DBLayer): replace char const* to std::string_view (#10211)
* feat(Core/DBLayer): replace `char const*` to `std::string_view` * CString * 1 * chore(Core/Misc): code cleanup * cl * db fix * fmt style sql * to fmt * py * del old * 1 * 2 * 3 * 1 * 1
This commit is contained in:
@@ -71,7 +71,7 @@ void LoadSkillPerfectItemTable()
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
uint32 spellId = fields[0].GetUInt32();
|
||||
uint32 spellId = fields[0].Get<uint32>();
|
||||
|
||||
if (!sSpellMgr->GetSpellInfo(spellId))
|
||||
{
|
||||
@@ -79,21 +79,21 @@ void LoadSkillPerfectItemTable()
|
||||
continue;
|
||||
}
|
||||
|
||||
uint32 requiredSpecialization = fields[1].GetUInt32();
|
||||
uint32 requiredSpecialization = fields[1].Get<uint32>();
|
||||
if (!sSpellMgr->GetSpellInfo(requiredSpecialization))
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Skill perfection data for spell {} has non-existent required specialization spell id {} in `skill_perfect_item_template`!", spellId, requiredSpecialization);
|
||||
continue;
|
||||
}
|
||||
|
||||
float perfectCreateChance = fields[2].GetFloat();
|
||||
float perfectCreateChance = fields[2].Get<float>();
|
||||
if (perfectCreateChance <= 0.0f)
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Skill perfection data for spell {} has impossibly low proc chance in `skill_perfect_item_template`!", spellId);
|
||||
continue;
|
||||
}
|
||||
|
||||
uint32 perfectItemType = fields[3].GetUInt32();
|
||||
uint32 perfectItemType = fields[3].Get<uint32>();
|
||||
if (!sObjectMgr->GetItemTemplate(perfectItemType))
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Skill perfection data for spell {} references non-existent perfect item id {} in `skill_perfect_item_template`!", spellId, perfectItemType);
|
||||
@@ -157,7 +157,7 @@ void LoadSkillExtraItemTable()
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
uint32 spellId = fields[0].GetUInt32();
|
||||
uint32 spellId = fields[0].Get<uint32>();
|
||||
|
||||
if (!sSpellMgr->GetSpellInfo(spellId))
|
||||
{
|
||||
@@ -165,21 +165,21 @@ void LoadSkillExtraItemTable()
|
||||
continue;
|
||||
}
|
||||
|
||||
uint32 requiredSpecialization = fields[1].GetUInt32();
|
||||
uint32 requiredSpecialization = fields[1].Get<uint32>();
|
||||
if (!sSpellMgr->GetSpellInfo(requiredSpecialization))
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Skill specialization {} have not existed required specialization spell id {} in `skill_extra_item_template`!", spellId, requiredSpecialization);
|
||||
continue;
|
||||
}
|
||||
|
||||
float additionalCreateChance = fields[2].GetFloat();
|
||||
float additionalCreateChance = fields[2].Get<float>();
|
||||
if (additionalCreateChance <= 0.0f)
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Skill specialization {} has too low additional create chance in `skill_extra_item_template`!", spellId);
|
||||
continue;
|
||||
}
|
||||
|
||||
int32 newMaxOrEntry = fields[3].GetInt32();
|
||||
int32 newMaxOrEntry = fields[3].Get<int32>();
|
||||
if (!newMaxOrEntry)
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Skill specialization {} has 0 max number of extra items in `skill_extra_item_template`!", spellId);
|
||||
|
||||
Reference in New Issue
Block a user