benilla-re systems structs docs

s_nearestKind

global · ui

Address
0xb4e3b8 · 4 bytes, up to 0xb4e3bb
Type
uint32_t
Meaning
Holds the kind, 1 to 4, the nearby list was built for
Confidence
verified, proof one
Finding
ui/targeting#cycling-through-nearby-units

Finding: Cycling through nearby units in ui: selecting a target

TargetNearestEnemy([reverse]), TargetNearestFriend, TargetNearestPartyMember and TargetNearestRaidMember call 0x493f60(reverse, kind) with kind 1 to 4. The function builds, once per three seconds of use, a list of the units that pass the kind's filter and a distance gate, sorts it, and selects the next entry after the current target (the previous one for reverse), wrapping at the end; a list older than one second is rebuilt on wrapping. It does nothing without the active player or when the protected gate for kind 4 fails.

The derivation is in the doc.