benilla-re systems structs docs

Script::GetMerchantNumItems

function · ui · orchestration

Address
0x4fb130 · 23 bytes, up to 0x4fb146
Signature
int __fastcall (lua_State *L)
Meaning
Returns the number of vendor items
Confidence
verified, proof one
Name from
the community database (idb)
Finding
ui/inventoryverbs#vendor-stock

Finding: Vendor stock in ui: inventory, container, bank and vendor getters

GetMerchantNumItems() returns the vendor's item count and CloseMerchant() closes the window. GetMerchantItemInfo(index) returns the item name (nil while uncached), the icon path, the price, the bundle quantity, the number available (-1 for unlimited) and 1 when the player can use the item; for an unusable item the last is nil, and an index past the list gives nil, nil, 0, 1, 0, 1. GetMerchantItemLink(index) returns the link or no value. GetMerchantItemMaxStack(index) returns the stack size of the item when the row's bundle quantity is 1 or less, else 1. BuyMerchantItem(index [, quantity]) clears the cursor and buys with the quantity from 1 to 255 (1 for a missing or below-1 number).

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 1

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