[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

@ -159,18 +159,18 @@ void Totem::SetTypeBySummonSpell(SpellEntry const * spellProto)
m_type = TOTEM_STATUE; //Jewelery statue
}
bool Totem::IsImmunedToSpell(SpellEntry const* spellInfo)
bool Totem::IsImmunedToSpellEffect(SpellEntry const* spellInfo, uint32 index) const
{
for (int i=0;i<3;i++)
// TODO: possibly all negative auras immuned?
switch(spellInfo->EffectApplyAuraName[index])
{
switch(spellInfo->EffectApplyAuraName[i])
{
case SPELL_AURA_PERIODIC_DAMAGE:
case SPELL_AURA_PERIODIC_LEECH:
return true;
default:
continue;
}
case SPELL_AURA_PERIODIC_DAMAGE:
case SPELL_AURA_PERIODIC_LEECH:
case SPELL_AURA_MOD_FEAR:
case SPELL_AURA_TRANSFORM:
return true;
default:
break;
}
return Creature::IsImmunedToSpell(spellInfo);
return Creature::IsImmunedToSpellEffect(spellInfo, index);
}