CGGameUI::TargetNearest
function · ui · primitive
- Address
0x493f60· 671 bytes, up to0x4941fe- Signature
void __fastcall (uint32_t reverse, uint32_t kind)- Meaning
- Selects the next unit of a kind from the sorted nearby list, rebuilding it when stale
- 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.
Callers 5
- Script::TargetNearestEnemy ui
- Script::TargetNearestFriend ui
- Script::TargetNearestPartyMember ui
- Script::TargetNearestRaidMember ui
- CGUnit_C::CanStartMeleeAttack objectlayer
Callees 8
- OsGetAsyncTimeMs core
- ClntObjMgrEnumObjects objectlayer
- ClntObjMgrObjectPtr objectlayer
- ClntObjMgrGetActivePlayer objectlayer
- CGGameUI::SelectTarget ui
- CGGameUI::TargetKindAccepts ui
- CheckActivePlayer ui
- _qsort crt
Calls and jumps by a bare address, from tables/calls.tsv.