diff options
| author | megamage <none@none> | 2009-03-07 17:23:43 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2009-03-07 17:23:43 -0600 |
| commit | 62f2db914c739f3a3ce177eddc7d529b71614aeb (patch) | |
| tree | 2a136df940333d403d69e03680ce18c9c0b92239 /src/game/Unit.cpp | |
| parent | d5b7aec2b61e35fa5ff0e7e76f16a3ed2f3ce077 (diff) | |
*Fix a crash when statues are killed.
*Really fix some spells without target info sent to server.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
| -rw-r--r-- | src/game/Unit.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 6df058fbc36..3a2af7e8d3f 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -4194,13 +4194,10 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode) if(!caster) // can be already located for IsSingleTargetSpell case caster = Aur->GetCaster(); - if(caster) + if(caster && caster->isAlive()) { - if(caster->GetTypeId()==TYPEID_UNIT && ((Creature*)caster)->isTotem() && ((Totem*)caster)->GetTotemType()==TOTEM_STATUE) - statue = ((Totem*)caster); - // stop caster chanelling state - else if(caster->m_currentSpells[CURRENT_CHANNELED_SPELL] + if(caster->m_currentSpells[CURRENT_CHANNELED_SPELL] //prevent recurential call && caster->m_currentSpells[CURRENT_CHANNELED_SPELL]->getState() != SPELL_STATE_FINISHED) { @@ -4215,6 +4212,9 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode) caster->m_currentSpells[CURRENT_CHANNELED_SPELL]->cancel(); } } + + if(caster->GetTypeId()==TYPEID_UNIT && ((Creature*)caster)->isTotem() && ((Totem*)caster)->GetTotemType()==TOTEM_STATUE) + statue = ((Totem*)caster); } // Unsummon summon as possessed creatures on spell cancel |
