Core/CreatureAI: Do not remove clone_caster auras on evade (in addition to control_vehicle auras)
This commit is contained in:
1 parent
54d2b73f3c
commit
d0bde02b21
3 files changed
+31
-8
No files matched your search
@@ -4068,19 +4068,40 @@ void Unit::RemoveAllAurasExceptType(AuraType type)
|
||||
for (AuraApplicationMap::iterator iter = m_appliedAuras.begin(); iter != m_appliedAuras.end();)
|
||||
{
|
||||
Aura const* aura = iter->second->GetBase();
|
||||
if (!aura->GetSpellInfo()->HasAura(type))
|
||||
_UnapplyAura(iter, AURA_REMOVE_BY_DEFAULT);
|
||||
else
|
||||
if (aura->GetSpellInfo()->HasAura(type))
|
||||
++iter;
|
||||
else
|
||||
_UnapplyAura(iter, AURA_REMOVE_BY_DEFAULT);
|
||||
}
|
||||
|
||||
for (AuraMap::iterator iter = m_ownedAuras.begin(); iter != m_ownedAuras.end();)
|
||||
{
|
||||
Aura* aura = iter->second;
|
||||
if (!aura->GetSpellInfo()->HasAura(type))
|
||||
RemoveOwnedAura(iter, AURA_REMOVE_BY_DEFAULT);
|
||||
else
|
||||
if (aura->GetSpellInfo()->HasAura(type))
|
||||
++iter;
|
||||
else
|
||||
RemoveOwnedAura(iter, AURA_REMOVE_BY_DEFAULT);
|
||||
}
|
||||
}
|
||||
|
||||
void Unit::RemoveAllAurasExceptType(AuraType type1, AuraType type2)
|
||||
{
|
||||
for (AuraApplicationMap::iterator iter = m_appliedAuras.begin(); iter != m_appliedAuras.end();)
|
||||
{
|
||||
Aura const* aura = iter->second->GetBase();
|
||||
if (aura->GetSpellInfo()->HasAura(type1) || aura->GetSpellInfo()->HasAura(type2))
|
||||
++iter;
|
||||
else
|
||||
_UnapplyAura(iter, AURA_REMOVE_BY_DEFAULT);
|
||||
}
|
||||
|
||||
for (AuraMap::iterator iter = m_ownedAuras.begin(); iter != m_ownedAuras.end();)
|
||||
{
|
||||
Aura* aura = iter->second;
|
||||
if (aura->GetSpellInfo()->HasAura(type1) || aura->GetSpellInfo()->HasAura(type2))
|
||||
++iter;
|
||||
else
|
||||
RemoveOwnedAura(iter, AURA_REMOVE_BY_DEFAULT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user