mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 09:39:11 +00:00
fix(Core/Spell): Handle ClearAllDebuffs (#5006)
This commit is contained in:
@@ -4427,6 +4427,19 @@ void Unit::RemoveAura(Aura* aura, AuraRemoveMode mode)
|
||||
RemoveAura(aurApp, mode);
|
||||
}
|
||||
|
||||
void Unit::RemoveOwnedAuras(std::function<bool(Aura const*)> const& check)
|
||||
{
|
||||
for (AuraMap::iterator iter = m_ownedAuras.begin(); iter != m_ownedAuras.end();)
|
||||
{
|
||||
if (check(iter->second))
|
||||
{
|
||||
RemoveOwnedAura(iter);
|
||||
continue;
|
||||
}
|
||||
++iter;
|
||||
}
|
||||
}
|
||||
|
||||
void Unit::RemoveAppliedAuras(std::function<bool(AuraApplication const*)> const& check)
|
||||
{
|
||||
for (AuraApplicationMap::iterator iter = m_appliedAuras.begin(); iter != m_appliedAuras.end();)
|
||||
@@ -4440,6 +4453,19 @@ void Unit::RemoveAppliedAuras(std::function<bool(AuraApplication const*)> const&
|
||||
}
|
||||
}
|
||||
|
||||
void Unit::RemoveOwnedAuras(uint32 spellId, std::function<bool(Aura const*)> const& check)
|
||||
{
|
||||
for (AuraMap::iterator iter = m_ownedAuras.lower_bound(spellId); iter != m_ownedAuras.upper_bound(spellId);)
|
||||
{
|
||||
if (check(iter->second))
|
||||
{
|
||||
RemoveOwnedAura(iter);
|
||||
continue;
|
||||
}
|
||||
++iter;
|
||||
}
|
||||
}
|
||||
|
||||
void Unit::RemoveAppliedAuras(uint32 spellId, std::function<bool(AuraApplication const*)> const& check)
|
||||
{
|
||||
for (AuraApplicationMap::iterator iter = m_appliedAuras.lower_bound(spellId); iter != m_appliedAuras.upper_bound(spellId);)
|
||||
|
||||
Reference in New Issue
Block a user