Restore used spell mods if spell cast fails.
--HG-- branch : trunk
This commit is contained in:
1 parent
39dd09532b
commit
bc55209b3e
3 files changed
+30
-3
No files matched your search
+7
-2
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user