fix(Core/Spell): Handle ClearAllDebuffs (#5006)
This commit is contained in:
parent
c19ea1f7ad
commit
07f2087683
4 changed files with 74 additions and 6 deletions
|
|
@ -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);)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue