mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
Fix added check for IsImmunedToSpell
Signed-off-by: dr.skull <dr.skull@centrum.sk>
This commit is contained in:
@@ -1675,10 +1675,10 @@ bool Creature::IsImmunedToSpell(SpellInfo const* spellInfo)
|
||||
// This check must be done instead of 'if (GetCreatureTemplate()->MechanicImmuneMask & (1 << (spellInfo->Mechanic - 1)))' for not break
|
||||
// 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 (uint32 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
{
|
||||
if(!spellInfo->Effects[i].IsEffect())
|
||||
break;
|
||||
if (!spellInfo->Effects[i].IsEffect())
|
||||
continue;
|
||||
if (!IsImmunedToSpellEffect(spellInfo, i))
|
||||
{
|
||||
immunedToAllEffects = false;
|
||||
|
||||
@@ -11534,12 +11534,12 @@ bool Unit::IsImmunedToSpell(SpellInfo const* spellInfo)
|
||||
}
|
||||
|
||||
bool immuneToAllEffects = true;
|
||||
for (uint32 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
{
|
||||
// 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())
|
||||
break;
|
||||
if (!spellInfo->Effects[i].IsEffect())
|
||||
continue;
|
||||
if (!IsImmunedToSpellEffect(spellInfo, i))
|
||||
{
|
||||
immuneToAllEffects = false;
|
||||
|
||||
Reference in New Issue
Block a user