fix(Core/Player): allow attacking target within boundary radius when… (#22500)

Co-authored-by: Kito <kito@vortexirc.com>
This commit is contained in:
Jelle Meeus
2025-07-29 05:38:49 -07:00
committed by GitHub
parent 98eda3684d
commit 40c58123b1
4 changed files with 18 additions and 6 deletions

View File

@@ -7126,7 +7126,7 @@ SpellCastResult Spell::CheckRange(bool strict)
return SPELL_FAILED_TOO_CLOSE;
}
if (m_caster->IsPlayer() && (m_spellInfo->FacingCasterFlags & SPELL_FACING_FLAG_INFRONT) && !m_caster->HasInArc(static_cast<float>(M_PI), target))
if (m_caster->IsPlayer() && (m_spellInfo->FacingCasterFlags & SPELL_FACING_FLAG_INFRONT) && !m_caster->HasInArc(static_cast<float>(M_PI), target) && !m_caster->IsWithinBoundaryRadius(target))
return SPELL_FAILED_UNIT_NOT_INFRONT;
}
@@ -9129,7 +9129,7 @@ namespace Acore
}
else
{
if (!_caster->isInFront(target, _coneAngle))
if (!_caster->IsWithinBoundaryRadius(target->ToUnit()) && !_caster->isInFront(target, _coneAngle))
return false;
}
return WorldObjectSpellAreaTargetCheck::operator ()(target);