diff options
author | megamage <none@none> | 2009-05-10 12:41:05 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-10 12:41:05 -0500 |
commit | c153f7f272d574cf72c7c96825db19973655d209 (patch) | |
tree | acb922a221c838af29126160d79fde7ec82d8b63 /src | |
parent | 1576a44d38eb1d9c035652e2bc109488d12f1ce4 (diff) |
*A temp fix for the crash caused by feared statue. I will push a better fix later. Thanks to Drahy.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Spell.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 5d4dae7f0b5..5b53647fe4c 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2856,8 +2856,7 @@ void Spell::finish(bool ok) m_caster->clearUnitState(UNIT_STAT_CASTING); // Unsummon summon as possessed creatures on spell cancel - if(IsChanneledSpell(m_spellInfo) - && m_caster->GetTypeId() == TYPEID_PLAYER) + if(IsChanneledSpell(m_spellInfo) && m_caster->GetTypeId() == TYPEID_PLAYER) { if (Unit * charm = m_caster->GetCharm()) for(int i = 0; i < 3; ++i) @@ -2875,7 +2874,12 @@ void Spell::finish(bool ok) } } } - else if (m_caster->GetTypeId()==TYPEID_UNIT && ((Creature*)m_caster)->isSummon()) + + // other code related only to successfully finished spells + if(!ok) + return; + + if (m_caster->GetTypeId()==TYPEID_UNIT && ((Creature*)m_caster)->isSummon()) { // Unsummon statue uint32 spell = m_caster->GetUInt32Value(UNIT_CREATED_BY_SPELL); @@ -2888,10 +2892,6 @@ void Spell::finish(bool ok) } } - // other code related only to successfully finished spells - if(!ok) - return; - //remove spell mods if (m_caster->GetTypeId() == TYPEID_PLAYER) ((Player*)m_caster)->RemoveSpellMods(this); |