[8816] call uncharm for all units at delete

currently it was only done for players - but units
also can have charms which must be removed
This commit is contained in:
balrok 2009-11-13 08:07:58 -05:00
parent ef26908948
commit c3c7ab2f63
6 changed files with 19 additions and 14 deletions

View file

@ -3487,6 +3487,12 @@ void Aura::HandleModCharm(bool apply, bool Real)
if( apply )
{
if (m_target->GetCharmerGUID())
{
m_target->RemoveSpellsCausingAura(SPELL_AURA_MOD_CHARM);
m_target->RemoveSpellsCausingAura(SPELL_AURA_MOD_POSSESS);
}
m_target->SetCharmerGUID(GetCasterGUID());
m_target->setFaction(caster->getFaction());
m_target->CastStop(m_target == caster ? GetId() : 0);