*Missing function from commit r90b0ebdba9 :(.

--HG--
branch : trunk
This commit is contained in:
QAston
2010-08-30 18:33:02 +02:00
parent 8d0f2f8a31
commit ee8d61eaa4

View File

@@ -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)