mirror of
https://github.com/mangosfour/server.git
synced 2025-12-21 19:37:02 +00:00
[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:
parent
ef26908948
commit
c3c7ab2f63
6 changed files with 19 additions and 14 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue