diff options
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r-- | src/game/Spell.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 66a237d9198..e9ab64f87d4 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2720,9 +2720,14 @@ void Spell::finish(bool ok) if(!m_caster->IsNonMeleeSpellCasted(false, false, true)) m_caster->clearUnitState(UNIT_STAT_CASTING); + if(!ok)
+ {
+ //restore spell mods
+ if (m_caster->GetTypeId() == TYPEID_PLAYER)
+ ((Player*)m_caster)->RestoreSpellMods(this);
+ return;
+ }
// other code related only to successfully finished spells - if(!ok) - return; //remove spell mods if (m_caster->GetTypeId() == TYPEID_PLAYER) |