mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 02:20:27 +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:
@@ -698,6 +698,16 @@ bool Unit::IsWithinRange(Unit const* obj, float dist) const
|
||||
return distsq <= dist * dist;
|
||||
}
|
||||
|
||||
bool Unit::IsWithinBoundaryRadius(const Unit* obj) const
|
||||
{
|
||||
if (!obj || !IsInMap(obj) || !InSamePhase(obj))
|
||||
return false;
|
||||
|
||||
float objBoundaryRadius = std::max(obj->GetBoundaryRadius(), MIN_MELEE_REACH);
|
||||
|
||||
return IsInDist(obj, objBoundaryRadius);
|
||||
}
|
||||
|
||||
bool Unit::GetRandomContactPoint(Unit const* obj, float& x, float& y, float& z, bool force) const
|
||||
{
|
||||
float combat_reach = GetCombatReach();
|
||||
|
||||
Reference in New Issue
Block a user