fix(Core/Hook): Fix OnAuraRemove not being called for owned auras. (#15930)
* Fix OnAuraRemove hook not being called for owned auras. * Removed OnAuraRemove from multiple places and moved to singular call.
This commit is contained in:
@@ -4575,6 +4575,8 @@ void Unit::_UnapplyAura(AuraApplicationMap::iterator& i, AuraRemoveMode removeMo
|
|||||||
// only way correctly remove all auras from list
|
// only way correctly remove all auras from list
|
||||||
//if (removedAuras != m_removedAurasCount) new aura may be added
|
//if (removedAuras != m_removedAurasCount) new aura may be added
|
||||||
i = m_appliedAuras.begin();
|
i = m_appliedAuras.begin();
|
||||||
|
|
||||||
|
sScriptMgr->OnAuraRemove(this, aurApp, removeMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Unit::_UnapplyAura(AuraApplication* aurApp, AuraRemoveMode removeMode)
|
void Unit::_UnapplyAura(AuraApplication* aurApp, AuraRemoveMode removeMode)
|
||||||
@@ -4718,8 +4720,6 @@ void Unit::RemoveAura(AuraApplicationMap::iterator& i, AuraRemoveMode mode)
|
|||||||
// Remove aura - for Area and Target auras
|
// Remove aura - for Area and Target auras
|
||||||
if (aura->GetOwner() == this)
|
if (aura->GetOwner() == this)
|
||||||
aura->Remove(mode);
|
aura->Remove(mode);
|
||||||
|
|
||||||
sScriptMgr->OnAuraRemove(this, aurApp, mode);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Unit::RemoveAura(uint32 spellId, ObjectGuid caster, uint8 reqEffMask, AuraRemoveMode removeMode)
|
void Unit::RemoveAura(uint32 spellId, ObjectGuid caster, uint8 reqEffMask, AuraRemoveMode removeMode)
|
||||||
|
|||||||
Reference in New Issue
Block a user