Minor correction to a7fc2586e7 - load columns from db in the same order they're stored.
This commit is contained in:
@@ -394,7 +394,7 @@ void ConditionMgr::LoadConditions(bool isReload)
|
|||||||
}
|
}
|
||||||
|
|
||||||
QueryResult result = WorldDatabase.Query("SELECT SourceTypeOrReferenceId, SourceGroup, SourceEntry, SourceId, ElseGroup, ConditionTypeOrReference, "
|
QueryResult result = WorldDatabase.Query("SELECT SourceTypeOrReferenceId, SourceGroup, SourceEntry, SourceId, ElseGroup, ConditionTypeOrReference, "
|
||||||
" ConditionValue1, ConditionValue2, ConditionValue3, ErrorTextId, ScriptName, NegateCondition FROM conditions");
|
" ConditionValue1, ConditionValue2, ConditionValue3, NegativeCondition, ErrorTextId, ScriptName FROM conditions");
|
||||||
|
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
@@ -420,9 +420,9 @@ void ConditionMgr::LoadConditions(bool isReload)
|
|||||||
cond->mConditionValue1 = fields[6].GetUInt32();
|
cond->mConditionValue1 = fields[6].GetUInt32();
|
||||||
cond->mConditionValue2 = fields[7].GetUInt32();
|
cond->mConditionValue2 = fields[7].GetUInt32();
|
||||||
cond->mConditionValue3 = fields[8].GetUInt32();
|
cond->mConditionValue3 = fields[8].GetUInt32();
|
||||||
cond->ErrorTextd = fields[9].GetUInt32();
|
cond->mNegativeCondition = fields[9].GetUInt8();
|
||||||
cond->mScriptId = sObjectMgr->GetScriptId(fields[10].GetCString());
|
cond->ErrorTextd = fields[10].GetUInt32();
|
||||||
cond->mNegativeCondition = fields[11].GetUInt8();
|
cond->mScriptId = sObjectMgr->GetScriptId(fields[11].GetCString());
|
||||||
|
|
||||||
if (iConditionTypeOrReference >= 0)
|
if (iConditionTypeOrReference >= 0)
|
||||||
cond->mConditionType = ConditionType(iConditionTypeOrReference);
|
cond->mConditionType = ConditionType(iConditionTypeOrReference);
|
||||||
|
|||||||
@@ -1243,7 +1243,7 @@ void Pet::_SaveAuras(SQLTransaction& trans)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// don't save guid of caster in case we are caster of the spell - guid for pet is generated every pet load, so it won't match saved guid anyways
|
// don't save guid of caster in case we are caster of the spell - guid for pet is generated every pet load, so it won't match saved guid anyways
|
||||||
uint64 casterGUID = (itr->second->GetCasterGUID() == GetGUID()) ? NULL : itr->second->GetCasterGUID();
|
uint64 casterGUID = (itr->second->GetCasterGUID() == GetGUID()) ? 0 : itr->second->GetCasterGUID();
|
||||||
|
|
||||||
trans->PAppend("INSERT INTO pet_aura (guid, caster_guid, spell, effect_mask, recalculate_mask, stackcount, amount0, amount1, amount2, base_amount0, base_amount1, base_amount2, maxduration, remaintime, remaincharges) "
|
trans->PAppend("INSERT INTO pet_aura (guid, caster_guid, spell, effect_mask, recalculate_mask, stackcount, amount0, amount1, amount2, base_amount0, base_amount1, base_amount2, maxduration, remaintime, remaincharges) "
|
||||||
"VALUES ('%u', '" UI64FMTD "', '%u', '%u', '%u', '%u', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%u')",
|
"VALUES ('%u', '" UI64FMTD "', '%u', '%u', '%u', '%u', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%u')",
|
||||||
|
|||||||
Reference in New Issue
Block a user