aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2022-09-09 21:48:35 +0200
committerShauren <shauren.trinity@gmail.com>2022-09-09 21:48:35 +0200
commita55a566602c323fc6950994d87c55552531e8688 (patch)
tree02b5bc2495c7ad01465b5c7f84fd5fa0292ed8ec /src
parent5ec5e1e1d0bfd586f934de7716ac88abaaa972b1 (diff)
Core/Auras: Fixed requireImmunityPurgesEffectAttribute logic for school immunities
Closes #28237
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index db211e8d1fb..eeb8c7410af 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -7763,10 +7763,13 @@ bool Unit::IsImmunedToSpell(SpellInfo const* spellInfo, WorldObject const* caste
continue;
SpellInfo const* immuneSpellInfo = sSpellMgr->GetSpellInfo(itr->second);
+ if (requireImmunityPurgesEffectAttribute)
+ if (!immuneSpellInfo || !immuneSpellInfo->HasAttribute(SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY))
+ continue;
+
// Consider the school immune if any of these conditions are not satisfied.
// In case of no immuneSpellInfo, ignore that condition and check only the other conditions
- if ((immuneSpellInfo && !immuneSpellInfo->IsPositive() && (!requireImmunityPurgesEffectAttribute || immuneSpellInfo->HasAttribute(SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY)))
- || !spellInfo->IsPositive() || !caster || !IsFriendlyTo(caster))
+ if ((immuneSpellInfo && !immuneSpellInfo->IsPositive()) || !spellInfo->IsPositive() || !caster || !IsFriendlyTo(caster))
if (!spellInfo->CanPierceImmuneAura(immuneSpellInfo))
schoolImmunityMask |= itr->first;
}