Jump to content

[FIX] Proc spell and damage for periodic damage crits


michalpolko

Recommended Posts

MaNGOS Revision: 10459

What does it fix?

Some spells proc from periodic damage crits, such as Living Bomb DoT crits should proc Ignite. This fix allows choosing between NORMAL and CRITICAL_HIT PROC_EX flag.


diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 92ea8a4..7b38298 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -6508,6 +6508,7 @@ void Aura::PeriodicTick()
            // Set trigger flag
            uint32 procAttacker = PROC_FLAG_ON_DO_PERIODIC; //  | PROC_FLAG_SUCCESSFUL_HARMFUL_SPELL_HIT;
            uint32 procVictim   = PROC_FLAG_ON_TAKE_PERIODIC;// | PROC_FLAG_TAKEN_HARMFUL_SPELL_HIT;
+            uint32 procEx       = isCrit ? PROC_EX_CRITICAL_HIT : PROC_EX_NORMAL_HIT;
            pdamage = (pdamage <= absorb + resist) ? 0 : (pdamage - absorb - resist);

            SpellPeriodicAuraLogInfo pInfo(this, pdamage, 0, absorb, resist, 0.0f, isCrit);
@@ -6516,7 +6517,7 @@ void Aura::PeriodicTick()
            if (pdamage)
                procVictim|=PROC_FLAG_TAKEN_ANY_DAMAGE;

-            pCaster->ProcDamageAndSpell(target, procAttacker, procVictim, PROC_EX_NORMAL_HIT, pdamage, BASE_ATTACK, spellProto);
+            pCaster->ProcDamageAndSpell(target, procAttacker, procVictim, procEx, pdamage, BASE_ATTACK, spellProto);

            pCaster->DealDamage(target, pdamage, &cleanDamage, DOT, GetSpellSchoolMask(spellProto), spellProto, true);

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use