mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 01:37:01 +00:00
[11708] add negative auras, channeled and regeneration spells immunity for totems
This commit is contained in:
parent
ac486506ab
commit
6a597ae755
5 changed files with 60 additions and 30 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue