[7111] Fixes in Spell Effect immunes

Correct totem immunes for dot/leech/Fear/Transform auras (immune only to effect)
Correct log if all effects immuned by Effect Immune
Move check for IMMUNITY_STATE to Unit::IsImmunedToSpellEffect

Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
DiSlord 2009-01-19 02:51:32 +03:00
parent c9ae3b8b5c
commit 17004d59d4
11 changed files with 61 additions and 53 deletions

View file

@ -1547,12 +1547,12 @@ bool Creature::IsImmunedToSpell(SpellEntry const* spellInfo)
return Unit::IsImmunedToSpell(spellInfo);
}
bool Creature::IsImmunedToSpellEffect(uint32 effect, uint32 mechanic) const
bool Creature::IsImmunedToSpellEffect(SpellEntry const* spellInfo, uint32 index) const
{
if (GetCreatureInfo()->MechanicImmuneMask & (1 << (mechanic-1)))
if (GetCreatureInfo()->MechanicImmuneMask & (1 << (spellInfo->EffectMechanic[index] - 1)))
return true;
return Unit::IsImmunedToSpellEffect(effect, mechanic);
return Unit::IsImmunedToSpellEffect(spellInfo, index);
}
SpellEntry const *Creature::reachWithSpellAttack(Unit *pVictim)