aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2016-11-07 23:50:18 -0300
committerariel- <ariel-@users.noreply.github.com>2016-11-07 23:50:18 -0300
commited49626c22e7bfb731aac1d6b5607e12ec851d5a (patch)
tree9dacf337f4e165488ea74e46d505f360502575bc /src
parent471a8bccc3078778bacf3b0af63e0f0beb15d00e (diff)
Core/Spell: fix interaction of on taken damage procs with triggered casts
DB/Spell: Seal of Righteousness proc - Lightining and Water Shield should proc with triggered Closes #18211
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/SpellMgr.cpp23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index c5c613aacd9..d9925ee0cf7 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -1610,9 +1610,14 @@ void SpellMgr::LoadSpellProcs()
if (!spellInfo)
continue;
+ // Data already present in DB, overwrites default proc
if (mSpellProcMap.find(spellInfo->Id) != mSpellProcMap.end())
continue;
+ // Nothing to do if no flags set
+ if (!spellInfo->ProcFlags)
+ continue;
+
bool addTriggerFlag = false;
uint32 procSpellTypeMask = PROC_SPELL_TYPE_NONE;
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
@@ -1630,15 +1635,27 @@ void SpellMgr::LoadSpellProcs()
procSpellTypeMask |= spellTypeMask[auraName];
if (isAlwaysTriggeredAura[auraName])
addTriggerFlag = true;
+
+ // many proc auras with taken procFlag mask don't have attribute "can proc with triggered"
+ // they should proc nevertheless (example mage armor spells with judgement)
+ if (!addTriggerFlag && (spellInfo->ProcFlags & TAKEN_HIT_PROC_FLAG_MASK) != 0)
+ {
+ switch (auraName)
+ {
+ case SPELL_AURA_PROC_TRIGGER_SPELL:
+ case SPELL_AURA_PROC_TRIGGER_DAMAGE:
+ addTriggerFlag = true;
+ break;
+ default:
+ break;
+ }
+ }
break;
}
if (!procSpellTypeMask)
continue;
- if (!spellInfo->ProcFlags)
- continue;
-
SpellProcEntry procEntry;
procEntry.SchoolMask = 0;
procEntry.ProcFlags = spellInfo->ProcFlags;