Core/Units: Made RemoveAllAurasExceptVehicle more generic, can now be used to remove all auras except specified type
This commit is contained in:
@@ -4010,12 +4010,12 @@ void Unit::RemoveAllAurasRequiringDeadTarget()
|
||||
}
|
||||
}
|
||||
|
||||
void Unit::RemoveAllAurasExceptVehicle()
|
||||
void Unit::RemoveAllAurasExceptType(AuraType type)
|
||||
{
|
||||
for (AuraApplicationMap::iterator iter = m_appliedAuras.begin(); iter != m_appliedAuras.end();)
|
||||
{
|
||||
Aura const* aura = iter->second->GetBase();
|
||||
if (!IsSpellHaveAura(aura->GetSpellProto(), SPELL_AURA_CONTROL_VEHICLE))
|
||||
if (!IsSpellHaveAura(aura->GetSpellProto(), type))
|
||||
_UnapplyAura(iter, AURA_REMOVE_BY_DEFAULT);
|
||||
else
|
||||
++iter;
|
||||
@@ -4024,7 +4024,7 @@ void Unit::RemoveAllAurasExceptVehicle()
|
||||
for (AuraMap::iterator iter = m_ownedAuras.begin(); iter != m_ownedAuras.end();)
|
||||
{
|
||||
Aura* aura = iter->second;
|
||||
if (!IsSpellHaveAura(aura->GetSpellProto(), SPELL_AURA_CONTROL_VEHICLE))
|
||||
if (!IsSpellHaveAura(aura->GetSpellProto(), type))
|
||||
RemoveOwnedAura(iter, AURA_REMOVE_BY_DEFAULT);
|
||||
else
|
||||
++iter;
|
||||
|
||||
@@ -1664,7 +1664,7 @@ class Unit : public WorldObject
|
||||
void RemoveArenaAuras(bool onleave = false);
|
||||
void RemoveAllAurasOnDeath();
|
||||
void RemoveAllAurasRequiringDeadTarget();
|
||||
void RemoveAllAurasExceptVehicle();
|
||||
void RemoveAllAurasExceptType(AuraType type);
|
||||
void DelayOwnedAuras(uint32 spellId, uint64 caster, int32 delaytime);
|
||||
|
||||
void _RemoveAllAuraStatMods();
|
||||
|
||||
Reference in New Issue
Block a user