mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 05:06:24 +00:00
fix(Core/Player): allow attacking target within boundary radius when… (#22500)
Co-authored-by: Kito <kito@vortexirc.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user