mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[12108] Add RemoveSpellsCausingAura to remove auras of type and caster
This commit is contained in:
parent
07d4c15dbb
commit
88e18898e2
3 changed files with 16 additions and 1 deletions
|
|
@ -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()))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue