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
This commit is contained in:
ariel- authored and roc13x committed 2017-05-04 01:27:57 +01:00
1 parent 04b562418e
commit f133041b80
2 files changed
+29 -3

No files matched your search

@@ -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);
+20 -3
View File
@@ -1664,9 +1664,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)
@@ -1684,15 +1689,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;