aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2018-02-12 00:17:34 -0300
committerShauren <shauren.trinity@gmail.com>2021-06-19 23:34:15 +0200
commit3582bacc4a3550725d288b55fb16311dee0ae0df (patch)
tree9d19d8a9f4b29666f0440752044da096bc923929 /src
parent13be704cb4619ef585ae0043580e2534f62e64aa (diff)
Core/Spells: add log on load about improper use of attribute PROC_ATTR_REQ_SPELLMOD
(cherry picked from commit dfa861593ea3adf06a52cbddbe9e60131dcfe626)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/SpellMgr.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 3cb6ab166e3..c7df86abfe5 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -1616,6 +1616,24 @@ void SpellMgr::LoadSpellProcs()
TC_LOG_ERROR("sql.sql", "The `spell_proc` table entry for spellId %u has wrong `HitMask` set: %u", spellInfo->Id, procEntry.HitMask);
if (procEntry.HitMask && !(procEntry.ProcFlags & TAKEN_HIT_PROC_FLAG_MASK || (procEntry.ProcFlags & DONE_HIT_PROC_FLAG_MASK && (!procEntry.SpellPhaseMask || procEntry.SpellPhaseMask & (PROC_SPELL_PHASE_HIT | PROC_SPELL_PHASE_FINISH)))))
TC_LOG_ERROR("sql.sql", "The `spell_proc` table entry for spellId %u has `HitMask` value defined, but it will not be used for defined `ProcFlags` and `SpellPhaseMask` values.", spellInfo->Id);
+ if (procEntry.AttributesMask & PROC_ATTR_REQ_SPELLMOD)
+ {
+ bool found = false;
+ for (SpellEffectInfo const* effect : spellInfo->GetEffects())
+ {
+ if (!effect || !effect->IsAura())
+ continue;
+
+ if (effect->ApplyAuraName == SPELL_AURA_ADD_PCT_MODIFIER || effect->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, spellInfo->Difficulty }] = procEntry;