From 5fad0fb43af8498c1ae6d4bc79f47fe318d391c8 Mon Sep 17 00:00:00 2001 From: Aqua Deus <95978183+aquadeus@users.noreply.github.com> Date: Tue, 23 Sep 2025 21:50:21 +0200 Subject: Core/Auras: Implement SPELL_AURA_INTERFERE_ALL_TARGETING (SPELL_AURA_486) (#31286) --- src/server/game/Spells/Spell.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/server/game/Spells/Spell.cpp') diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index cd4299d8bf6..b4e5711d7f2 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -6039,17 +6039,25 @@ SpellCastResult Spell::CheckCast(bool strict, int32* param1 /*= nullptr*/, int32 if (castResult != SPELL_CAST_OK) return castResult; - // If it's not a melee spell, check if vision is obscured by SPELL_AURA_INTERFERE_TARGETTING + // 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 (Unit const* unitCaster = m_caster->ToUnit()) { - for (AuraEffect const* auraEff : unitCaster->GetAuraEffectsByType(SPELL_AURA_INTERFERE_TARGETTING)) + for (AuraEffect const* auraEff : unitCaster->GetAuraEffectsByType(SPELL_AURA_INTERFERE_ENEMY_TARGETING)) if (!unitCaster->IsFriendlyTo(auraEff->GetCaster()) && !target->HasAura(auraEff->GetId(), auraEff->GetCasterGUID())) return SPELL_FAILED_VISION_OBSCURED; - for (AuraEffect const* auraEff : target->GetAuraEffectsByType(SPELL_AURA_INTERFERE_TARGETTING)) - if (!unitCaster->IsFriendlyTo(auraEff->GetCaster()) && (!target->HasAura(auraEff->GetId(), auraEff->GetCasterGUID()) || !unitCaster->HasAura(auraEff->GetId(), auraEff->GetCasterGUID()))) + for (AuraEffect const* auraEff : target->GetAuraEffectsByType(SPELL_AURA_INTERFERE_ENEMY_TARGETING)) + if (!unitCaster->IsFriendlyTo(auraEff->GetCaster()) && !unitCaster->HasAura(auraEff->GetId(), auraEff->GetCasterGUID())) + return SPELL_FAILED_VISION_OBSCURED; + + for (AuraEffect const* auraEff : unitCaster->GetAuraEffectsByType(SPELL_AURA_INTERFERE_ALL_TARGETING)) + if (!target->HasAura(auraEff->GetId(), auraEff->GetCasterGUID())) + return SPELL_FAILED_VISION_OBSCURED; + + for (AuraEffect const* auraEff : target->GetAuraEffectsByType(SPELL_AURA_INTERFERE_ALL_TARGETING)) + if (!unitCaster->HasAura(auraEff->GetId(), auraEff->GetCasterGUID())) return SPELL_FAILED_VISION_OBSCURED; } } -- cgit v1.2.3