diff options
-rw-r--r-- | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index fdde3126ebb..96d2b491ec7 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -3213,7 +3213,7 @@ void AuraEffect::HandleAuraModSchoolImmunity(AuraApplication const* aurApp, uint else { // do not remove unit flag if there are more than this auraEffect of that kind on unit - if (target->HasAuraType(GetAuraType())) + if (target->HasAuraType(GetAuraType()) || target->HasAuraType(SPELL_AURA_DAMAGE_IMMUNITY)) return; target->RemoveUnitFlag(UNIT_FLAG_IMMUNE); } @@ -3228,7 +3228,17 @@ void AuraEffect::HandleAuraModDmgImmunity(AuraApplication const* aurApp, uint8 m m_spellInfo->ApplyAllSpellImmunitiesTo(target, GetSpellEffectInfo(), apply); if (apply) + { + target->AddUnitFlag(UNIT_FLAG_IMMUNE); target->GetThreatManager().EvaluateSuppressed(); + } + else + { + // do not remove unit flag if there are more than this auraEffect of that kind on unit + if (target->HasAuraType(GetAuraType()) || target->HasAuraType(SPELL_AURA_SCHOOL_IMMUNITY)) + return; + target->RemoveUnitFlag(UNIT_FLAG_IMMUNE); + } } void AuraEffect::HandleAuraModDispelImmunity(AuraApplication const* aurApp, uint8 mode, bool apply) const |