From dfa861593ea3adf06a52cbddbe9e60131dcfe626 Mon Sep 17 00:00:00 2001 From: ariel- Date: Mon, 12 Feb 2018 00:17:34 -0300 Subject: Core/Spells: add log on load about improper use of attribute PROC_ATTR_REQ_SPELLMOD --- src/server/game/Spells/SpellMgr.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src') diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index ec66d537640..b0480a184b0 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -1636,6 +1636,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(i), static_cast(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; -- cgit v1.2.3