mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 01:37:37 +01:00
*Missing function from commit r90b0ebdba9 :(.
--HG-- branch : trunk
This commit is contained in:
@@ -4497,6 +4497,27 @@ void Unit::RemoveAllAurasOnDeath()
|
||||
}
|
||||
}
|
||||
|
||||
void Unit::RemoveAllAurasRequiringDeadTarget()
|
||||
{
|
||||
for (AuraApplicationMap::iterator iter = m_appliedAuras.begin(); iter != m_appliedAuras.end();)
|
||||
{
|
||||
Aura const * aura = iter->second->GetBase();
|
||||
if (!aura->IsPassive() && IsRequiringDeadTargetSpell(aura->GetSpellProto()))
|
||||
_UnapplyAura(iter, AURA_REMOVE_BY_DEFAULT);
|
||||
else
|
||||
++iter;
|
||||
}
|
||||
|
||||
for (AuraMap::iterator iter = m_ownedAuras.begin(); iter != m_ownedAuras.end();)
|
||||
{
|
||||
Aura * aura = iter->second;
|
||||
if (!aura->IsPassive() && IsRequiringDeadTargetSpell(aura->GetSpellProto()))
|
||||
RemoveOwnedAura(iter, AURA_REMOVE_BY_DEFAULT);
|
||||
else
|
||||
++iter;
|
||||
}
|
||||
}
|
||||
|
||||
void Unit::DelayOwnedAuras(uint32 spellId, uint64 caster, int32 delaytime)
|
||||
{
|
||||
for (AuraMap::iterator iter = m_ownedAuras.lower_bound(spellId); iter != m_ownedAuras.upper_bound(spellId);++iter)
|
||||
|
||||
Reference in New Issue
Block a user