From 462086f3b11931f04efec5b9baef2a88f859fac6 Mon Sep 17 00:00:00 2001 From: megamage Date: Sat, 8 Aug 2009 11:53:48 -0500 Subject: [PATCH] *Fix a bug that UNIT_STAT_CASTING is not cleared when delayed spells are casted. --HG-- branch : trunk --- src/game/Spell.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 2a2a89399c..991b525afa 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2930,6 +2930,9 @@ void Spell::cast(bool skipCheck) m_immediateHandled = false; m_spellState = SPELL_STATE_DELAYED; SetDelayStart(0); + + if(m_caster->hasUnitState(UNIT_STAT_CASTING) && !m_caster->IsNonMeleeSpellCasted(false, false, true)) + m_caster->clearUnitState(UNIT_STAT_CASTING); } else {