diff options
author | megamage <none@none> | 2009-02-02 16:04:17 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-02-02 16:04:17 -0600 |
commit | 5d943336c53a84b9d0e7a451ea57b8abac1b5039 (patch) | |
tree | 5789335c0a0cf613c4a00f8a6f5f77a8d7d8687e /src | |
parent | 49a9e26498cd8c2ff1115cc779092feed573f12b (diff) |
*Fix the bug that some instant cast spells do not remove auras with cast interrupte flag.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Spell.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 417afad7c41..c4db2454724 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2083,8 +2083,7 @@ void Spell::prepare(SpellCastTargets * targets, Aura* triggeredByAura) // set timer base at cast time ReSetTimer(); - //item: first cast may destroy item and second cast causes crash - if(m_IsTriggeredSpell || !m_casttime && !m_spellInfo->StartRecoveryTime && !m_castItemGUID && GetCurrentContainer() == CURRENT_GENERIC_SPELL) + if(m_IsTriggeredSpell) cast(true); else { @@ -2093,9 +2092,16 @@ void Spell::prepare(SpellCastTargets * targets, Aura* triggeredByAura) if(isSpellBreakStealth(m_spellInfo) ) m_caster->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CAST); - m_caster->SetCurrentCastedSpell( this ); - m_selfContainer = &(m_caster->m_currentSpells[GetCurrentContainer()]); - SendSpellStart(); + if(!m_casttime && !m_spellInfo->StartRecoveryTime + && !m_castItemGUID //item: first cast may destroy item and second cast causes crash + && GetCurrentContainer() == CURRENT_GENERIC_SPELL) + cast(true); + else + { + m_caster->SetCurrentCastedSpell( this ); + m_selfContainer = &(m_caster->m_currentSpells[GetCurrentContainer()]); + SendSpellStart(); + } } } |