diff options
author | Liberate <none@none> | 2010-05-26 15:38:31 +0200 |
---|---|---|
committer | Liberate <none@none> | 2010-05-26 15:38:31 +0200 |
commit | aa5100e7d9f86e0551a727574f73100e7cfcc077 (patch) | |
tree | 0244d1cf1b8c1c8f8568d0b804e8bb1de4f74762 /src/game/Spell.cpp | |
parent | 3718dfa94f2ad4bcfdb9f3260de56ba4c1f68be0 (diff) |
*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
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r-- | src/game/Spell.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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); |