diff options
author | Treeston <treeston.mmoc@gmail.com> | 2016-02-10 20:33:10 +0100 |
---|---|---|
committer | Treeston <treeston.mmoc@gmail.com> | 2016-02-10 20:33:10 +0100 |
commit | d67e87733b2e258dc4f5613ee7fa40445e3b215f (patch) | |
tree | e48587cf8bc3fb796ddfdead290b6dcbb71c4b86 /src | |
parent | cfed2d7a3ddf4f8121d3359f9888e6116fc82e62 (diff) | |
parent | b72ae883bcd72bbdd3492eff03869407a0e988c6 (diff) |
Merge pull request #16483 from Treeston/3.3.5-debuffimmunity
[3.3.5] Make Web Wrap / Mutating Injection (and others) properly cancel on immunity (Divine Shield/Ice Block)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 2 | ||||
-rw-r--r-- | src/server/game/Spells/SpellInfo.cpp | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 207908c6d51..1cab186b95e 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -3384,7 +3384,7 @@ void AuraEffect::HandleAuraModSchoolImmunity(AuraApplication const* aurApp, uint && !iter->second->IsPositive() //Don't remove positive spells && spell->Id != GetId()) //Don't remove self { - target->RemoveAura(iter); + target->RemoveAura(iter, AURA_REMOVE_BY_ENEMY_SPELL); } else ++iter; diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 699e4857ee0..bcb64541a17 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -1221,14 +1221,18 @@ bool SpellInfo::CanDispelAura(SpellInfo const* aura) const if (HasAttribute(SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY) && !aura->IsDeathPersistent()) return true; - // These auras (like Divine Shield) can't be dispelled - if (aura->HasAttribute(SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY)) - return false; - // These auras (Cyclone for example) are not dispelable if (aura->HasAttribute(SPELL_ATTR1_UNAFFECTED_BY_SCHOOL_IMMUNE)) return false; + // Divine Shield etc can dispel auras if they don't ignore school immunity + if (HasAttribute(SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY) && !aura->IsDeathPersistent()) + return true; + + // These auras (like Divine Shield) can't be dispelled + if (aura->HasAttribute(SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY)) + return false; + return true; } |