diff options
| author | QAston <none@none> | 2009-06-07 22:14:00 +0200 |
|---|---|---|
| committer | QAston <none@none> | 2009-06-07 22:14:00 +0200 |
| commit | c03809938911d5d57755c32d74e32412062a28fe (patch) | |
| tree | a202961b2352e08a1b68f6fe26d9cbbcd7b63636 /src/game/Unit.cpp | |
| parent | d0c801d6cf8190e57a739f124af4a756a7c3d8fc (diff) | |
| parent | 540c5291eb8a688060a25cac0fd77676740b7250 (diff) | |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
| -rw-r--r-- | src/game/Unit.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 82efd2e54a4..14ad660df6d 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -513,6 +513,17 @@ void Unit::UpdateInterruptMask() m_interruptMask |= spell->m_spellInfo->ChannelInterruptFlags; } +bool Unit::HasAuraTypeWithFamilyFlags(AuraType auraType, uint32 familyName, uint32 familyFlags) const +{ + if(!HasAuraType(auraType)) return false; + AuraEffectList const &auras = GetAurasByType(auraType); + for(AuraEffectList::const_iterator itr = auras.begin(); itr != auras.end(); ++itr) + if(SpellEntry const *iterSpellProto = (*itr)->GetSpellProto()) + if(iterSpellProto->SpellFamilyName == familyName && iterSpellProto->SpellFamilyFlags[0] & familyFlags) + return true; + return false; +} + /* Called by DealDamage for auras that have a chance to be dispelled on damage taken. */ void Unit::RemoveSpellbyDamageTaken(uint32 damage, uint32 spell) { |
