benilla-re systems structs docs

Script::GetBuybackItemInfo

function · ui · primitive

Address
0x4fb310 · 595 bytes, up to 0x4fb562
Signature
int __fastcall (lua_State *L)
Meaning
Returns the name, icon, price, count, available and usable values of a buy-back slot
Confidence
verified, proof one
Name from
the community database (idb)
Finding
ui/merchant#buy-back-reads

Finding: Buy-back reads in ui: buy-back, shopping tooltips and repair

GetNumBuybackItems() returns the cached count 0xbddfac, or 0 with no vendor open. GetBuybackItemInfo(index) (1-based) returns six values: the item name, the icon path, the price (the price field of the slot), the stack count, 0 (available), and 1 when the player can use the item else nil. An index past the count, a missing player, an empty slot or an uncached item record returns nil, nil, 0, 1, 0, 1; the last is the number, not a boolean. After the window closes the cache still answers (below). A cache miss queues the item with 0x4fb570, which signals MERCHANT_UPDATE (317).

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 16

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