API:GetBuyBackData
From RoR Wiki
UI Lua API · Interact functions
Version: WAR 1.4.8
Returns the items the player can buy back from the merchant store.
items = GetBuyBackData()
Arguments
None.
Returns
- items
table– Array of items, indexed from 1. Empty if there is nothing to buy back.
Each entry is an item data table with one extra field:
| Key | Type | Meaning |
|---|---|---|
cost |
number |
Buy-back price. |
Details
- Each call builds a new table from the client's stored buy-back list.
- If the Lua state is not available, the function returns nothing.
Errors
None.
Example
From default/ea_interactionwindow/source/interactionwindowstore.lua:
function EA_Window_InteractionStore.UpdateBuyBackList()
EA_Window_InteractionStore.buyBackData = GetBuyBackData()
EA_Window_InteractionStore.PreProcessStoreData( EA_Window_InteractionStore.buyBackData )
EA_Window_InteractionStore.ShowBuyBackList()
end
