Core/Spells: Adjust on-apply dispel behavior of Divine Shield / Ice Block etc.

- Now counts as a hostile dispel (triggers on-dispel effects: Grobbulus injection etc)
- Can dispel non-deathpersist spells despite ATTR0_UNAFFECTED_BY_INVULNERABILITY (despite the name, this only means they can be applied while immune, not that the aura cannot be removed by immunity), if they do not have SPELL_ATTR1_UNAFFECTED_BY_SCHOOL_IMMUNE (debuffs like recently bandaged etc have this)
This commit is contained in:
treeston committed 2016-02-06 16:14:39 +01:00
1 parent e064000a35
commit b72ae883bc
2 files changed
+9 -5

No files matched your search

+8 -4
View File
@@ -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;
}