[9776] Set m_mover to NULL on remove SPELL_AURA_MOD_POSSESS by delete.

This should fix a related crash.

Signed-off-by: hunuza <hunuza@gmail.com>
This commit is contained in:
hunuza 2010-04-22 18:48:48 +02:00
parent 7532061a79
commit 1ef89c7a22
3 changed files with 17 additions and 11 deletions

View file

@ -4480,7 +4480,9 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode)
statue = ((Totem*)caster);
sLog.outDebug("Aura %u now is remove mode %d",Aur->GetModifier()->m_auraname, mode);
if (mode != AURA_REMOVE_BY_DELETE) // not unapply if target will deleted
// some auras also need to apply modifier (on caster) on remove
if (mode != AURA_REMOVE_BY_DELETE || Aur->GetModifier()->m_auraname == SPELL_AURA_MOD_POSSESS)
Aur->ApplyModifier(false,true);
if (Aur->_RemoveAura())