benilla-re systems structs docs

Script::CheckPetUntrainerDist

function · ui · orchestration

Address
0x48d1c0 · 80 bytes, up to 0x48d20f
Signature
int __fastcall (lua_State *L)
Meaning
Pushes 1 when the remembered pet trainer is in interaction range, else nil
Confidence
verified, proof one
Name from
the community database (idb)
Finding
ui/popups#pet-unlearn

Finding: Pet unlearn in ui: session and dialog verbs

CheckPetUntrainerDist() pushes 1 when the active player is the one at 0x5dfd30 and the remembered pet trainer in 0xc4d7b0 is within interaction range, else nil, never 0. ConfirmPetUnlearn() pushes nothing: with a player it calls PetUnlearnDialog(0, 0), which sends opcode 0x2f0 with the remembered trainer GUID unless the cost in 0xc4d7b8 exceeds the money (ERR_NOT_ENOUGH_MONEY) or the trainer is out of range. Opcode 0x2f1, u64 trainerGuid, u32 cost, calls PetUnlearnDialog(&guid, cost): it remembers both and signals CONFIRM_PET_UNLEARN with the cost in copper; a zero GUID shows ERR_TALENT_WIPE_ERROR.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 5

Calls and jumps by a bare address, from tables/calls.tsv.