diff options
| author | ariel- <ariel-@users.noreply.github.com> | 2018-02-12 00:17:34 -0300 | 
|---|---|---|
| committer | ariel- <ariel-@users.noreply.github.com> | 2018-02-12 00:21:26 -0300 | 
| commit | dfa861593ea3adf06a52cbddbe9e60131dcfe626 (patch) | |
| tree | b03306d1a2804d977dbd72ab06ab71f78d20f669 /src | |
| parent | 546a605bd0cd0e828def81e26697f1c116a3f1b7 (diff) | |
Core/Spells: add log on load about improper use of attribute PROC_ATTR_REQ_SPELLMOD
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/Spells/SpellMgr.cpp | 18 | 
1 files changed, 18 insertions, 0 deletions
| 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<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; | 
