diff options
author | treeston <treeston.mmoc@gmail.com> | 2016-02-06 13:38:28 +0100 |
---|---|---|
committer | treeston <treeston.mmoc@gmail.com> | 2016-02-06 16:14:39 +0100 |
commit | b72ae883bcd72bbdd3492eff03869407a0e988c6 (patch) | |
tree | 2cdf477f99732e704a21a4076b2410c967151c03 /src | |
parent | e064000a355005f596557c2ad10d5d189996f426 (diff) |
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)
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 6a10d113553..776167979c1 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; } |