[11708] add negative auras, channeled and regeneration spells immunity for totems

This commit is contained in:
Laise 2011-07-03 12:26:17 +03:00
parent ac486506ab
commit 6a597ae755
5 changed files with 60 additions and 30 deletions

View file

@ -4643,6 +4643,10 @@ SpellCastResult Spell::CheckCast(bool strict)
return SPELL_FAILED_CASTER_AURASTATE;
}
// totem immunity for channeled spells(needs to be before spell cast)
if (IsChanneledSpell(m_spellInfo) && target->GetTypeId() == TYPEID_UNIT && ((Creature*)target)->IsTotem())
return SPELL_FAILED_IMMUNE;
bool non_caster_target = target != m_caster && !IsSpellWithCasterSourceTargetsOnly(m_spellInfo);
if(non_caster_target)