[11758] better check for totem immunity for channeled spells

This commit is contained in:
Laise 2011-07-28 11:49:47 +03:00
parent 4f397bf7aa
commit 2fab507ed6
2 changed files with 6 additions and 2 deletions

View file

@ -4648,7 +4648,11 @@ SpellCastResult Spell::CheckCast(bool strict)
} }
// totem immunity for channeled spells(needs to be before spell cast) // totem immunity for channeled spells(needs to be before spell cast)
if (IsChanneledSpell(m_spellInfo) && target->GetTypeId() == TYPEID_UNIT && ((Creature*)target)->IsTotem()) // spell attribs for player channeled spells
if ((m_spellInfo->AttributesEx & SPELL_ATTR_EX_UNK14)
&& (m_spellInfo->AttributesEx5 & SPELL_ATTR_EX5_UNK13)
&& target->GetTypeId() == TYPEID_UNIT
&& ((Creature*)target)->IsTotem())
return SPELL_FAILED_IMMUNE; return SPELL_FAILED_IMMUNE;
bool non_caster_target = target != m_caster && !IsSpellWithCasterSourceTargetsOnly(m_spellInfo); bool non_caster_target = target != m_caster && !IsSpellWithCasterSourceTargetsOnly(m_spellInfo);

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "11757" #define REVISION_NR "11758"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__