diff options
| author | NoName <322016+Faq@users.noreply.github.com> | 2020-01-17 17:50:50 +0200 |
|---|---|---|
| committer | Giacomo Pozzoni <giacomopoz@gmail.com> | 2020-01-17 16:50:50 +0100 |
| commit | b3b7f0761d5605d57f9d62ca8e22a8cd9a4df24b (patch) | |
| tree | 6ce8c9decabdc7762602bd87df56232a706b45a0 /src/server/game/Entities/Unit | |
| parent | 89421422865b0d7743db22bb165bba0a3d8f2cfc (diff) | |
Core/Spells: SPELL_AURA_48 implementation (#24054)
by xvwyh
Diffstat (limited to 'src/server/game/Entities/Unit')
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 8 | ||||
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 6a00eeef85e..694b675256e 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -4503,6 +4503,14 @@ bool Unit::HasAuraTypeWithValue(AuraType auraType, int32 value) const return false; } +bool Unit::HasAuraTypeWithTriggerSpell(AuraType auratype, uint32 triggerSpell) const +{ + for (AuraEffect const* aura : GetAuraEffectsByType(auratype)) + if (aura->GetSpellInfo()->Effects[aura->GetEffIndex()].TriggerSpell == triggerSpell) + return true; + return false; +} + bool Unit::HasNegativeAuraWithInterruptFlag(uint32 flag, ObjectGuid guid) const { if (!(m_interruptMask & flag)) diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 24894fd6e5f..e1bad058282 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -1289,6 +1289,7 @@ class TC_GAME_API Unit : public WorldObject bool HasAuraTypeWithMiscvalue(AuraType auraType, int32 miscValue) const; bool HasAuraTypeWithAffectMask(AuraType auraType, SpellInfo const* affectedSpell) const; bool HasAuraTypeWithValue(AuraType auraType, int32 value) const; + bool HasAuraTypeWithTriggerSpell(AuraType auratype, uint32 triggerSpell) const; bool HasNegativeAuraWithInterruptFlag(uint32 flag, ObjectGuid guid = ObjectGuid::Empty) const; bool HasAuraWithMechanic(uint32 mechanicMask) const; bool HasStrongerAuraWithDR(SpellInfo const* auraSpellInfo, Unit* caster, bool triggered) const; |
