Merge pull request #6548 from Elron103/pull-requests
Core/Spells: Fix immunity checking for creatures (i.e. Mind Control)
This commit is contained in:
@@ -1668,8 +1668,8 @@ bool Creature::IsImmunedToSpell(SpellInfo const* spellInfo)
|
||||
if (!spellInfo)
|
||||
return false;
|
||||
|
||||
// Spells that don't have effectMechanics.
|
||||
if (!spellInfo->HasAnyEffectMechanic() && GetCreatureTemplate()->MechanicImmuneMask & (1 << (spellInfo->Mechanic - 1)))
|
||||
// Creature is immune to main mechanic of the spell
|
||||
if (GetCreatureTemplate()->MechanicImmuneMask & (1 << (spellInfo->Mechanic - 1)))
|
||||
return true;
|
||||
|
||||
// This check must be done instead of 'if (GetCreatureTemplate()->MechanicImmuneMask & (1 << (spellInfo->Mechanic - 1)))' for not break
|
||||
|
||||
Reference in New Issue
Block a user