mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 01:37:01 +00:00
[11758] better check for totem immunity for channeled spells
This commit is contained in:
parent
4f397bf7aa
commit
2fab507ed6
2 changed files with 6 additions and 2 deletions
|
|
@ -4648,7 +4648,11 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||
}
|
||||
|
||||
// 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;
|
||||
|
||||
bool non_caster_target = target != m_caster && !IsSpellWithCasterSourceTargetsOnly(m_spellInfo);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue