mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[11633] Implement function Unit::HasAffectedAura
This commit is contained in:
parent
54f623d2b8
commit
3443a97a28
5 changed files with 27 additions and 24 deletions
|
|
@ -488,11 +488,6 @@ void Unit::RemoveSpellsCausingAura(AuraType auraType, SpellAuraHolder* except)
|
|||
}
|
||||
}
|
||||
|
||||
bool Unit::HasAuraType(AuraType auraType) const
|
||||
{
|
||||
return (!m_modAuras[auraType].empty());
|
||||
}
|
||||
|
||||
/* Called by DealDamage for auras that have a chance to be dispelled on damage taken. */
|
||||
void Unit::RemoveSpellbyDamageTaken(AuraType auraType, uint32 damage)
|
||||
{
|
||||
|
|
@ -4919,6 +4914,24 @@ void Unit::_ApplyAllAuraMods()
|
|||
}
|
||||
}
|
||||
|
||||
bool Unit::HasAuraType(AuraType auraType) const
|
||||
{
|
||||
return !GetAurasByType(auraType).empty();
|
||||
}
|
||||
|
||||
bool Unit::HasAffectedAura(AuraType auraType, SpellEntry const* spellProto) const
|
||||
{
|
||||
Unit::AuraList const& auras = GetAurasByType(auraType);
|
||||
|
||||
for (Unit::AuraList::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
|
||||
{
|
||||
if ((*itr)->isAffectedOnSpell(spellProto))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Aura* Unit::GetAura(uint32 spellId, SpellEffectIndex effindex)
|
||||
{
|
||||
SpellAuraHolderBounds bounds = GetSpellAuraHolderBounds(spellId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue