mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
Returns (inRange, checkedRange) — 40-yard healing-range check
matching modern's shape. Reuses the CGObject::GetPosition vtable
virtual at slot 5 (offset 0x14) that Script_CheckInteractDistance
uses, just with a fixed 1600.0 squared-distance threshold.
Two notable behaviors:
UnitInRange("player") → (false, false). Documented Blizzard quirk
carried over from modern — the function is meant for "is *another*
unit in range" checks, querying yourself is meaningless. Short-
circuited before the position read so checkedRange=false is
unambiguous.
checkedRange=false when the unit's position can't be obtained:
unresolvable tokens, empty party/raid slots, raid members in a
different zone, target with nothing targeted, etc. The position
virtual returns null in those cases.
Vtable shape verified via the bytes at 0x0048BACF / 0x0048BADC
(both unit and player calls pass an out-buffer to vtable[+0x14] —
Ghidra's decomp dropped the player-call buffer push from the
output).