TrinityCore/TrinityCore — Issue #4212: problem with spells immunity system
Author: maxxx
Created: 2011-12-07 16:17:35+00:00
State: open

problematic block in code:
bool Unit::IsImmunedToSpell(SpellInfo const* spellInfo)
...
for (int 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].Mechanic)
{
if (IsImmunedToSpellEffect(spellInfo, i))
return true;
}
}
...
Here if unit is immune to 1 effect - he is immune to whole spell, it's wrong. Example:
http://www.wowhead.com/spell=62308 of ulduar demolishers VS Flame Leviathan - now Leviathan is immuned to knockback AND damage, should be only knockback effect.
P.S. there was a similar issue, can't find it.

rev https://github.com/TrinityCore/TrinityCore/commit/f5b3553bb3e6cf9d055cfdc7f230e3ddaeea559b