aboutsummaryrefslogtreecommitdiff
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
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
-rw-r--r--sql/updates/world/3.3.5/2016_11_07_01_world_335.sql9
-rw-r--r--src/server/game/Spells/SpellMgr.cpp23
2 files changed, 29 insertions, 3 deletions
diff --git a/sql/updates/world/3.3.5/2016_11_07_01_world_335.sql b/sql/updates/world/3.3.5/2016_11_07_01_world_335.sql
new file mode 100644
index 00000000000..50aece5916d
--- /dev/null
+++ b/sql/updates/world/3.3.5/2016_11_07_01_world_335.sql
@@ -0,0 +1,9 @@
+UPDATE `spell_proc` SET `AttributesMask`=0x2 WHERE `SpellId` IN (
+-324, -- Lightning Shield
+-52127 -- Water Shield
+);
+
+-- Seal of Righteousness
+DELETE FROM `spell_proc` WHERE `SpellId` =21084;
+INSERT INTO `spell_proc` (`SpellId`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `ProcFlags`, `SpellTypeMask`, `SpellPhaseMask`, `HitMask`, `AttributesMask`, `ProcsPerMinute`, `Chance`, `Cooldown`, `Charges`) VALUES
+(21084, 0, 0, 0x00000000, 0x00000000, 0x00000000, 0, 0x1, 0x2, 0x0, 0x2, 0, 0, 0, 0);
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;