Merge pull request #6827 from drskull/master
Core/Spells: Small fix IsImmunedToSpell
This commit is contained in:
@@ -1676,11 +1676,15 @@ bool Creature::IsImmunedToSpell(SpellInfo const* spellInfo)
|
||||
// the check of mechanic immunity on DB (tested) because GetCreatureTemplate()->MechanicImmuneMask and m_spellImmune[IMMUNITY_MECHANIC] don't have same data.
|
||||
bool immunedToAllEffects = true;
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
{
|
||||
if (!spellInfo->Effects[i].IsEffect())
|
||||
continue;
|
||||
if (!IsImmunedToSpellEffect(spellInfo, i))
|
||||
{
|
||||
immunedToAllEffects = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (immunedToAllEffects)
|
||||
return true;
|
||||
|
||||
|
||||
@@ -11457,6 +11457,8 @@ bool Unit::IsImmunedToSpell(SpellInfo const* spellInfo)
|
||||
{
|
||||
// State/effect immunities applied by aura expect full spell immunity
|
||||
// Ignore effects with mechanic, they are supposed to be checked separately
|
||||
if (!spellInfo->Effects[i].IsEffect())
|
||||
continue;
|
||||
if (!IsImmunedToSpellEffect(spellInfo, i))
|
||||
{
|
||||
immuneToAllEffects = false;
|
||||
|
||||
Reference in New Issue
Block a user