Script::BuyTrainerService
function · ui · primitive
- Address
0x4da210· 75 bytes, up to0x4da25a- Signature
int __fastcall (lua_State *L)- Meaning
- Buys one trainer service, or every visible one for an index of 0 or less
- Confidence
- verified, proof one
- Name from
- the community database (idb)
- Finding
- ui/trainer#index-law
Finding: Index law in ui: the trainer window
Every trainer getter accepts any index up to the total length, not the visible count. GetTrainerServiceInfo(i) returns
the name, the rank text, the state name and whether the row is expanded; past the total it returns nil, nil, nil, 1. The
other getters (GetTrainerServiceIcon, ...Cost, ...LevelReq, ...SkillReq, ...NumAbilityReq, ...AbilityReq,
...StepReq, ...Description, IsTrainerServiceSkillStep, ...LearnSpell, ...TradeSkill, ...StepIncrease) return nil
or 0 past it. BuyTrainerService(index) sends the purchase of one row (opcode 0x1b2: the trainer GUID and the row's spell id) when the
row exists and its state is 0; any other state is refused silently. An index of 0 or less buys every visible row.
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 6
- __ftol crt
- BuyTrainerRecord ui
- BuyAllTrainerRecords ui
- lua_isnumber lua
- lua_tonumber lua
- luaL_error lua
Calls and jumps by a bare address, from tables/calls.tsv.