aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellInfo.cpp
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2016-02-10 20:33:10 +0100
committerShauren <shauren.trinity@gmail.com>2016-04-05 19:56:26 +0200
commitac034a51dabd8b67c1bdac6320f5c431ec208981 (patch)
treef4c7ca9441f42c09acc3627c36c4ceff0da7ace8 /src/server/game/Spells/SpellInfo.cpp
parent73b917e122a05de46e73193c110a787de6734f92 (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) (cherry picked from commit d67e87733b2e258dc4f5613ee7fa40445e3b215f)
Diffstat (limited to 'src/server/game/Spells/SpellInfo.cpp')
-rw-r--r--src/server/game/Spells/SpellInfo.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index b4f321574d7..7b1e3889a7c 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -1578,14 +1578,18 @@ bool SpellInfo::CanDispelAura(SpellInfo const* aura) const
if (Attributes & 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;
}