SetTrainer
function · ui · orchestration
- Address
0x4d7440· 172 bytes, up to0x4d74eb- Signature
void __fastcall (uint64_t *guid, uint32_t type)- Meaning
- Opens the trainer window for a GUID and type, or closes it for GUID 0 and signals TRAINER_CLOSED
- Confidence
- verified, proof one
- Finding
- ui/trainer#trainer-state
Finding: Trainer state in ui: the trainer window
The window keeps its state in a few cells.
| cell | holds |
|---|---|
0xb73a00 | the open trainer's GUID (u64), 0 for none |
0xb73a08 | the trainer type: 0 class, 1 talent or mount, 2 tradeskill, 3 pet |
0xb73a0c | the selection, a spell id |
0xb737b0, 0xb73a10 | the array of pointers to 0x38-byte service records, and its total length |
0xb739c0, 0xb73a14 | the array of group headers and its length |
0xb73a18 | the visible count, what GetNumTrainerServices returns |
0xb73a1c, 0xb73a20, 0xb73a24 | the state filter, the skill-line filter and the expanded mask |
The derivation is in the doc.
Callers 6
- ClearInteractionTarget ui
- CloseTrainerForWorld ui
- Script::CloseTrainer ui
- CGPlayer_C::ReadTrainerList objectlayer
- TalkToTrainer objectlayer
- CGUnit_C::OnNPCFlagsChanged objectlayer
Callees 5
- ClntObjMgrGetActivePlayer objectlayer
- SetInteractionTarget ui
- EndInteractionWithGuid ui
- AcknowledgeTutorial ui
- FrameScript_SignalEvent ui
Calls and jumps by a bare address, from tables/calls.tsv.