benilla-re systems structs docs

UseInventorySlot

function · ui · orchestration

Address
0x4c7970 · 396 bytes, up to 0x4c7afb
Signature
void __fastcall (uint32_t slot, uint64_t *target)
Meaning
Clears the cursor, then repairs the item in a slot in repair mode, else uses it
Confidence
verified, proof one
Finding
ui/merchant#repair-clicks

Finding: Repair clicks in ui: buy-back, shopping tooltips and repair

In repair mode (locked cursor mode 0x11 and a repair vendor open), a click on an item in the four item-click Lua functions sends CMSG_REPAIR_ITEM for that item. When 0x4faf30(item) exceeds the player's coin it shows ERR_NOT_ENOUGH_MONEY and plays the player's error speech line 0x28, and stops. Otherwise it plays ITEM_REPAIR and sends the vendor GUID and the item's GUID; a cost of 0 sends too, and the cursor stays in repair mode. PickupInventoryItem and PickupContainerItem reach the arm only after a held item, a held vendor row and an empty slot are ruled out; money, spell, pet action, macro and stabled-pet payloads do not stop them. The two Use verbs first clear the cursor (ClearCursor(1, 1)), then repair.

The derivation is in the doc.

Callers 1

Callees 13

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