aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellMgr.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2009-05-08 00:37:13 +0200
committerQAston <none@none>2009-05-08 00:37:13 +0200
commite8474f32911ace12cc5fe11421c74dc7945f0e20 (patch)
treedc0333144fc3e75729c789810719ebe980d5d9cf /src/game/SpellMgr.cpp
parent51d4303d550cb1ac8bfef86b2b053b6e7c0a0b6f (diff)
*Do not allow to cast cyclone on divine shielded target.
--HG-- branch : trunk
Diffstat (limited to 'src/game/SpellMgr.cpp')
-rw-r--r--src/game/SpellMgr.cpp15
1 files changed, 15 insertions, 0 deletions
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;
}