*Fix a crash when statues are killed.
*Really fix some spells without target info sent to server. --HG-- branch : trunk
This commit is contained in:
+5
-5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user