Created
July 21, 2011 10:12
-
-
Save tobmaps/1096911 to your computer and use it in GitHub Desktop.
Anti-Magic Shield
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp | |
index 17200e6..887fdb7 100755 | |
--- a/src/server/game/Entities/Unit/Unit.cpp | |
+++ b/src/server/game/Entities/Unit/Unit.cpp | |
@@ -11764,9 +11764,8 @@ bool Unit::IsImmunedToSpellEffect(SpellEntry const* spellInfo, uint32 index) con | |
// Check for immune to application of harmful magical effects | |
AuraEffectList const& immuneAuraApply = GetAuraEffectsByType(SPELL_AURA_MOD_IMMUNE_AURA_APPLY_SCHOOL); | |
for (AuraEffectList::const_iterator iter = immuneAuraApply.begin(); iter != immuneAuraApply.end(); ++iter) | |
- if (spellInfo->Dispel == DISPEL_MAGIC && // Magic debuff | |
- ((*iter)->GetMiscValue() & GetSpellSchoolMask(spellInfo)) && // Check school | |
- !IsPositiveEffect(spellInfo->Id, index)) // Harmful | |
+ if (!(GetAllSpellMechanicMask(spellInfo) & IMMUNE_TO_MOVEMENT_IMPAIRMENT_AND_LOSS_CONTROL_MASK) && // Only spells with these mechanics | |
+ (*iter)->GetMiscValue() & GetSpellSchoolMask(spellInfo)) // Check school | |
return true; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Shouldn't this make you immune to stun and fear?