[12108] Add RemoveSpellsCausingAura to remove auras of type and caster

This commit is contained in:
kid10 2012-08-21 15:43:40 +02:00 committed by Antz
parent 07d4c15dbb
commit 88e18898e2
3 changed files with 16 additions and 1 deletions

View file

@ -778,6 +778,20 @@ void Unit::RemoveSpellsCausingAura(AuraType auraType, SpellAuraHolder* except)
}
}
void Unit::RemoveSpellsCausingAura(AuraType auraType, ObjectGuid casterGuid)
{
for (AuraList::const_iterator iter = m_modAuras[auraType].begin(); iter != m_modAuras[auraType].end();)
{
if ((*iter)->GetCasterGuid() == casterGuid)
{
RemoveAuraHolderFromStack((*iter)->GetId(), 1, casterGuid);
iter = m_modAuras[auraType].begin();
}
else
++iter;
}
}
void Unit::DealDamageMods(Unit* pVictim, uint32& damage, uint32* absorb)
{
if (!pVictim->isAlive() || pVictim->IsTaxiFlying() || (pVictim->GetTypeId() == TYPEID_UNIT && ((Creature*)pVictim)->IsInEvadeMode()))

View file

@ -1575,6 +1575,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
void RemoveAurasAtMechanicImmunity(uint32 mechMask, uint32 exceptSpellId, bool non_positive = false);
void RemoveSpellsCausingAura(AuraType auraType);
void RemoveSpellsCausingAura(AuraType auraType, SpellAuraHolder* except);
void RemoveSpellsCausingAura(AuraType auraType, ObjectGuid casterGuid);
void RemoveRankAurasDueToSpell(uint32 spellId);
bool RemoveNoStackAurasDueToAuraHolder(SpellAuraHolder* holder);
void RemoveAurasWithInterruptFlags(uint32 flags);

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "0152"
#define REVISION_NR "12108"
#endif // __REVISION_NR_H__