From aa5100e7d9f86e0551a727574f73100e7cfcc077 Mon Sep 17 00:00:00 2001 From: Liberate Date: Wed, 26 May 2010 15:38:31 +0200 Subject: *Fix: Don't apply an aura when it's duration is 0. (for example because of diminishing returns) This should fix interrupts when casting fear, stun, etc, while the duration is 0. Fix based on havenard's patch. Fixes issue 1621 Fixes issue 2271 --HG-- branch : trunk --- src/game/Spell.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 5b60e58b49f..d12998b7b63 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1390,6 +1390,12 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool if (IsChanneledSpell(m_spellInfo)) m_originalCaster->ModSpellCastTime(aurSpellInfo, duration, this); + if (duration <= 0) + { + m_spellAura->Remove(); + return SPELL_MISS_IMMUNE; + } + if (duration != m_spellAura->GetMaxDuration()) { m_spellAura->SetMaxDuration(duration); -- cgit v1.2.3