diff options
author | megamage <none@none> | 2009-03-23 16:34:30 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-23 16:34:30 -0600 |
commit | a8105dcff636226fbcc1c9c6ece3e8a5d65f0011 (patch) | |
tree | bb865464098bdfac413846a4e9d93fcae07f5b0a /src/game/SpellAuras.cpp | |
parent | e9fb303e362717b848b3cda10e69f44eb9791399 (diff) |
*Do not proc anything when aura is removed by cancel.
*Remove aura by cancel when duel complete. This fix a crash.
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellAuras.cpp')
-rw-r--r-- | src/game/SpellAuras.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 1e6c10a3b8a..ee8f2717c64 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -1022,6 +1022,10 @@ void Aura::_RemoveAura() ((Player*)caster)->SendCooldownEvent(GetSpellProto()); } + // do not proc anything if aura is cancelled + if(m_removeMode == AURA_REMOVE_BY_CANCEL) + return; + // Remove Linked Auras (on last aura remove) uint32 id = GetId(); if(spellmgr.GetSpellCustomAttr(id) & SPELL_ATTR_CU_LINK_REMOVE) @@ -1059,7 +1063,7 @@ void Aura::_RemoveAura() uint32 procEx=0; if (m_removeMode == AURA_REMOVE_BY_ENEMY_SPELL) procEx = PROC_EX_AURA_REMOVE_DESTROY; - else if (m_removeMode == AURA_REMOVE_BY_DEFAULT || m_removeMode == AURA_REMOVE_BY_CANCEL) + else if (m_removeMode == AURA_REMOVE_BY_DEFAULT)// || m_removeMode == AURA_REMOVE_BY_CANCEL) procEx = PROC_EX_AURA_REMOVE_EXPIRE; caster->ProcDamageAndSpell(m_target,ProcCaster, ProcVictim, procEx, m_modifier.m_amount, BASE_ATTACK, m_spellProto); @@ -2282,7 +2286,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real) else { // Final heal only on dispelled or duration end - if ( !(GetAuraDuration() <= 0 || m_removeMode==AURA_REMOVE_BY_ENEMY_SPELL) ) + if (GetAuraDuration() > 0 && m_removeMode != AURA_REMOVE_BY_ENEMY_SPELL) return; // final heal |