[11367] Check for SPELL_ATTR_EX_UNAFFECTED_BY_SCHOOL_IMMUNE when checking school immunity

This commit is contained in:
michalpolko 2011-04-16 11:49:20 +03:00 committed by Ambal
parent dbcca634e8
commit 4b7dffcc09
2 changed files with 5 additions and 4 deletions

View file

@ -5718,11 +5718,12 @@ SpellCastResult Spell::CheckCasterAuras() const
{ {
for (int32 i = 0; i < MAX_EFFECT_INDEX; ++i) for (int32 i = 0; i < MAX_EFFECT_INDEX; ++i)
{ {
if (GetSpellMechanicMask(itr->second->GetSpellProto(), 1 << i) & mechanic_immune) SpellEntry const * pEntry = holder->GetSpellProto();
if (GetSpellMechanicMask(pEntry, 1 << i) & mechanic_immune)
continue; continue;
if (GetSpellSchoolMask(itr->second->GetSpellProto()) & school_immune) if ((GetSpellSchoolMask(pEntry) & school_immune) && !(pEntry->AttributesEx & SPELL_ATTR_EX_UNAFFECTED_BY_SCHOOL_IMMUNE))
continue; continue;
if ((1<<(itr->second->GetSpellProto()->Dispel)) & dispel_immune) if ((1<<(pEntry->Dispel)) & dispel_immune)
continue; continue;
Aura *aura = holder->GetAuraByEffectIndex(SpellEffectIndex(i)); Aura *aura = holder->GetAuraByEffectIndex(SpellEffectIndex(i));
if (!aura) if (!aura)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "11366" #define REVISION_NR "11367"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__