mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 05:36: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:
@@ -939,20 +939,20 @@ void ConditionMgr::LoadConditions(bool isReload)
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
Condition* cond = new Condition();
|
||||
int32 iSourceTypeOrReferenceId = fields[0].GetInt32();
|
||||
cond->SourceGroup = fields[1].GetUInt32();
|
||||
cond->SourceEntry = fields[2].GetInt32();
|
||||
cond->SourceId = fields[3].GetInt32();
|
||||
cond->ElseGroup = fields[4].GetUInt32();
|
||||
int32 iConditionTypeOrReference = fields[5].GetInt32();
|
||||
cond->ConditionTarget = fields[6].GetUInt8();
|
||||
cond->ConditionValue1 = fields[7].GetUInt32();
|
||||
cond->ConditionValue2 = fields[8].GetUInt32();
|
||||
cond->ConditionValue3 = fields[9].GetUInt32();
|
||||
cond->NegativeCondition = fields[10].GetUInt8();
|
||||
cond->ErrorType = fields[11].GetUInt32();
|
||||
cond->ErrorTextId = fields[12].GetUInt32();
|
||||
cond->ScriptId = sObjectMgr->GetScriptId(fields[13].GetCString());
|
||||
int32 iSourceTypeOrReferenceId = fields[0].Get<int32>();
|
||||
cond->SourceGroup = fields[1].Get<uint32>();
|
||||
cond->SourceEntry = fields[2].Get<int32>();
|
||||
cond->SourceId = fields[3].Get<int32>();
|
||||
cond->ElseGroup = fields[4].Get<uint32>();
|
||||
int32 iConditionTypeOrReference = fields[5].Get<int32>();
|
||||
cond->ConditionTarget = fields[6].Get<uint8>();
|
||||
cond->ConditionValue1 = fields[7].Get<uint32>();
|
||||
cond->ConditionValue2 = fields[8].Get<uint32>();
|
||||
cond->ConditionValue3 = fields[9].Get<uint32>();
|
||||
cond->NegativeCondition = fields[10].Get<uint8>();
|
||||
cond->ErrorType = fields[11].Get<uint32>();
|
||||
cond->ErrorTextId = fields[12].Get<uint32>();
|
||||
cond->ScriptId = sObjectMgr->GetScriptId(fields[13].Get<std::string>());
|
||||
|
||||
if (iConditionTypeOrReference >= 0)
|
||||
cond->ConditionType = ConditionTypes(iConditionTypeOrReference);
|
||||
@@ -2291,7 +2291,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
|
||||
case CONDITION_PET_TYPE:
|
||||
if (cond->ConditionValue1 >= (1 << MAX_PET_TYPE))
|
||||
{
|
||||
LOG_ERROR("sql.sql", "CONDITION_PET_TYPE has non-existing pet type %u, skipped.", cond->ConditionValue1);
|
||||
LOG_ERROR("sql.sql", "CONDITION_PET_TYPE has non-existing pet type {}, skipped.", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user