FindSelectedTrainerRecord
function · ui · primitive
- Address
0x4d7520· 54 bytes, up to0x4d7555- Signature
int32_t __cdecl ()- Meaning
- Returns the array position of the selected spell id, or -1
- Confidence
- verified, proof one
- Finding
- ui/trainer#selection
Finding: Selection in ui: the trainer window
The selection is the spell id of the chosen record. SelectTrainerService(index) truncates the index, subtracts 1 and
stores that record's id; an index below 1 or at the total length or above clears the selection. A hidden record can be
selected. GetTrainerSelectionIndex() searches the whole array for the stored id and returns its 1-based position, or
0 when the id is 0, the array is empty or the id is absent. A trained row leaves the visible list but stays in the array,
so the index it returns is then above GetNumTrainerServices(). A group header holds -1, so selecting one reads back the
first header.
The derivation is in the doc.
Callers 1
Callees 0
None by a direct call or jump.
Calls and jumps by a bare address, from tables/calls.tsv.