Jump to content

[fix] Interrupt reduction effects


Guest KAPATEJIb

Recommended Posts

What bug does the patch fix? What features does the patch add?

Fixed interrupt reduction effects work, for example http://www.wowhead.com/?spell=20254

For which repository revision was the patch created?

9411

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

can't find any

Who has been writing this patch? Please include either forum user names or email addresses.

Me

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 9346ad7..e2ff807 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -4972,7 +4972,7 @@ void Spell::EffectHealMaxHealth(SpellEffectIndex /*eff_idx*/)
    m_healing += heal;
}

-void Spell::EffectInterruptCast(SpellEffectIndex /*eff_idx*/)
+void Spell::EffectInterruptCast(SpellEffectIndex eff_idx)
{
    if(!unitTarget)
        return;
@@ -4989,7 +4989,7 @@ void Spell::EffectInterruptCast(SpellEffectIndex /*eff_idx*/)
            // check if we can interrupt spell
            if ((curSpellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_INTERRUPT) && curSpellInfo->PreventionType == SPELL_PREVENTION_TYPE_SILENCE )
            {
-                unitTarget->ProhibitSpellSchool(GetSpellSchoolMask(curSpellInfo), GetSpellDuration(m_spellInfo));
+                unitTarget->ProhibitSpellSchool(GetSpellSchoolMask(curSpellInfo), unitTarget->CalculateSpellDuration(m_spellInfo, eff_idx, unitTarget));
                unitTarget->InterruptSpell(CurrentSpellTypes(i),false);
            }
        }

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