diff options
author | Aqua Deus <95978183+aquadeus@users.noreply.github.com> | 2025-09-23 21:50:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-23 21:50:21 +0200 |
commit | 5fad0fb43af8498c1ae6d4bc79f47fe318d391c8 (patch) | |
tree | 5046783cb30638ff1ac439d85f0acf786bdc1200 /src/server/game/Spells/Spell.cpp | |
parent | c575b397c591e7051c325046204da61086a0dbb9 (diff) |
Core/Auras: Implement SPELL_AURA_INTERFERE_ALL_TARGETING (SPELL_AURA_486) (#31286)
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
-rw-r--r-- | src/server/game/Spells/Spell.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
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; } } |