From e8474f32911ace12cc5fe11421c74dc7945f0e20 Mon Sep 17 00:00:00 2001 From: QAston Date: Fri, 8 May 2009 00:37:13 +0200 Subject: *Do not allow to cast cyclone on divine shielded target. --HG-- branch : trunk --- src/game/SpellMgr.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/game/SpellMgr.cpp') diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index e0b346ce13e..87d5d844ba2 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -799,6 +799,21 @@ bool IsDispelableBySpell(SpellEntry const * dispelSpell, uint32 spellId, bool de else return false; } + else if (spellproto->Mechanic == MECHANIC_INVULNERABILITY) + { + if (dispelSpell->AttributesEx & SPELL_ATTR_EX_UNAFFECTED_BY_SCHOOL_IMMUNE) + { + return true; + } + else + return false; + } + else + { + if ((dispelSpell->AttributesEx & SPELL_ATTR_EX_UNAFFECTED_BY_SCHOOL_IMMUNE) + || (dispelSpell->Attributes & SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY)) + return !def; + } return def; } -- cgit v1.2.3