Core/Spells: Spells with attribute SPELL_ATTR2_IGNORE_LINE_OF_SIGHT can bypass SPELL_AURA_INTERFERE_ENEMY_TARGETING and SPELL_AURA_INTERFERE_ALL_TARGETING (#31548)

This commit is contained in:
Aqua Deus
2026-02-01 11:36:32 +01:00
committed by GitHub
parent e0c88e3764
commit 714e4539b1

View File

@@ -6048,7 +6048,7 @@ SpellCastResult Spell::CheckCast(bool strict, int32* param1 /*= nullptr*/, int32
return castResult;
// If it's not a melee spell, check if vision is obscured by SPELL_AURA_INTERFERE_ENEMY_TARGETING
if (m_spellInfo->DmgClass != SPELL_DAMAGE_CLASS_MELEE)
if (m_spellInfo->DmgClass != SPELL_DAMAGE_CLASS_MELEE && !m_spellInfo->HasAttribute(SPELL_ATTR2_IGNORE_LINE_OF_SIGHT)) // targets can be hit with spells that ignore LoS
{
if (Unit const* unitCaster = m_caster->ToUnit())
{