*Fix the bug that some instant cast spells do not remove auras with cast interrupte flag.
--HG-- branch : trunk
This commit is contained in:
+8
-2
@@ -2083,8 +2083,7 @@ void Spell::prepare(SpellCastTargets * targets, Aura* triggeredByAura)
|
|||||||
// set timer base at cast time
|
// set timer base at cast time
|
||||||
ReSetTimer();
|
ReSetTimer();
|
||||||
|
|
||||||
//item: first cast may destroy item and second cast causes crash
|
if(m_IsTriggeredSpell)
|
||||||
if(m_IsTriggeredSpell || !m_casttime && !m_spellInfo->StartRecoveryTime && !m_castItemGUID && GetCurrentContainer() == CURRENT_GENERIC_SPELL)
|
|
||||||
cast(true);
|
cast(true);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -2093,11 +2092,18 @@ void Spell::prepare(SpellCastTargets * targets, Aura* triggeredByAura)
|
|||||||
if(isSpellBreakStealth(m_spellInfo) )
|
if(isSpellBreakStealth(m_spellInfo) )
|
||||||
m_caster->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CAST);
|
m_caster->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CAST);
|
||||||
|
|
||||||
|
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_caster->SetCurrentCastedSpell( this );
|
||||||
m_selfContainer = &(m_caster->m_currentSpells[GetCurrentContainer()]);
|
m_selfContainer = &(m_caster->m_currentSpells[GetCurrentContainer()]);
|
||||||
SendSpellStart();
|
SendSpellStart();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Spell::cancel(bool report)
|
void Spell::cancel(bool report)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user