* Implement immunity totems from periodic damage spell effects. Patch provided `win & DiSlord.

This commit is contained in:
VladimirMangos 2008-10-18 13:00:01 +04:00
parent 774e004954
commit ae01d16a73
3 changed files with 21 additions and 3 deletions

View file

@ -159,3 +159,19 @@ void Totem::SetTypeBySummonSpell(SpellEntry const * spellProto)
if(spellProto->SpellIconID==2056)
m_type = TOTEM_STATUE; //Jewelery statue
}
bool Totem::IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges)
{
for (int i=0;i<3;i++)
{
switch(spellInfo->EffectApplyAuraName[i])
{
case SPELL_AURA_PERIODIC_DAMAGE:
case SPELL_AURA_PERIODIC_LEECH:
return true;
default:
continue;
}
}
return Creature::IsImmunedToSpell(spellInfo, useCharges);
}