aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/SharedDefines.h2
-rw-r--r--src/game/SpellMgr.cpp3
-rw-r--r--src/game/Unit.cpp6
3 files changed, 9 insertions, 2 deletions
diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h
index 6733e73be25..9f28963581b 100644
--- a/src/game/SharedDefines.h
+++ b/src/game/SharedDefines.h
@@ -293,7 +293,7 @@ const uint32 ItemQualityColors[MAX_ITEM_QUALITY] = {
#define SPELL_ATTR_EX_UNK13 0x00002000 // 13
#define SPELL_ATTR_EX_STACK_FOR_DIFF_CASTERS 0x00004000 // 14
#define SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY 0x00008000 // 15 remove auras on immunity
-#define SPELL_ATTR_EX_UNK16 0x00010000 // 16 on immuniy
+#define SPELL_ATTR_EX_UNAFFECTED_BY_SCHOOL_IMMUNE 0x00010000 // 16 on immuniy
#define SPELL_ATTR_EX_UNAUTOCASTABLE_BY_PET 0x00020000 // 17
#define SPELL_ATTR_EX_UNK18 0x00040000 // 18
#define SPELL_ATTR_EX_CANT_TARGET_SELF 0x00080000 // 19 Applies only to unit target - for example Divine Intervention (19752)
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index 34a6c30db48..a72718fc98b 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -3161,7 +3161,8 @@ bool IsDispelableBySpell(SpellEntry const * dispelSpell, uint32 spellId, bool de
SpellEntry const *spellproto = sSpellStore.LookupEntry(spellId);
if (!spellproto) return false;
- if (spellproto->Attributes & SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY)
+ // Cyclone etc..
+ if (spellproto->AttributesEx & SPELL_ATTR_EX_UNAFFECTED_BY_SCHOOL_IMMUNE)
return false;
if(dispelSpell->Attributes & SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY)
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index cb6faf6ee3d..4107dc70b95 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -10738,6 +10738,9 @@ bool Unit::IsImmunedToDamage(SpellSchoolMask shoolMask)
bool Unit::IsImmunedToDamage(SpellEntry const* spellInfo)
{
+ if (spellInfo->Attributes & SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY)
+ return false;
+
uint32 shoolMask = GetSpellSchoolMask(spellInfo);
if (spellInfo->Id != 42292 && spellInfo->Id !=59752)
{
@@ -10768,6 +10771,9 @@ bool Unit::IsImmunedToSpell(SpellEntry const* spellInfo)
if (itr->type == spellInfo->Id)
return true;
+ if (spellInfo->Attributes & SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY)
+ return false;
+
if (spellInfo->Dispel)
{
SpellImmuneList const& dispelList = m_spellImmune[IMMUNITY_DISPEL];