Core/Spells: add log on load about improper use of attribute PROC_ATTR_REQ_SPELLMOD

This commit is contained in:
ariel-
2018-02-12 00:17:34 -03:00
committed by Aokromes
parent 54316a0b99
commit 3a4035bb8d

View File

@@ -1685,6 +1685,24 @@ void SpellMgr::LoadSpellProcs()
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
if ((procEntry.AttributesMask & (PROC_ATTR_DISABLE_EFF_0 << i)) && !spellInfo->Effects[i].IsAura())
TC_LOG_ERROR("sql.sql", "The `spell_proc` table entry for spellId %u has Attribute PROC_ATTR_DISABLE_EFF_%u, but effect %u is not an aura effect", spellInfo->Id, static_cast<uint32>(i), static_cast<uint32>(i));
if (procEntry.AttributesMask & PROC_ATTR_REQ_SPELLMOD)
{
bool found = false;
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
{
if (!spellInfo->Effects[i].IsAura())
continue;
if (spellInfo->Effects[i].ApplyAuraName == SPELL_AURA_ADD_PCT_MODIFIER || spellInfo->Effects[i].ApplyAuraName == SPELL_AURA_ADD_FLAT_MODIFIER)
{
found = true;
break;
}
}
if (!found)
TC_LOG_ERROR("sql.sql", "The `spell_proc` table entry for spellId %u has Attribute PROC_ATTR_REQ_SPELLMOD, but spell has no spell mods. Proc will not be triggered", spellInfo->Id);
}
mSpellProcMap[spellInfo->Id] = procEntry;