Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:GameData.InteractData.GetItemLootList

From RoR Wiki
Revision as of 19:42, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI Lua API · Loot functions
Version: WAR 1.4.8

Returns the choices of an opened item container (a "choose one" loot bag opened from the backpack).

items = GameData.InteractData.GetItemLootList()

Arguments

None.

Returns

items
table – Array of item data tables, indexed from 1. Empty if no container is open.

Details

  • Each call builds a new table from the client's stored list. ItemContainerLootItem clears that list.
  • The index of an item in this table is the choiceIndex for ItemContainerLootItem.
  • The stock UI reads it when SystemData.Events.INTERACT_SHOW_ITEM_CONTAINER_LOOT fires.
  • If the Lua state is not available, the function returns nothing.

Errors

None.

Example

From default/ea_lootwindow/source/chooseonelootwindow.lua:

EA_Window_ChooseOneLoot.lootData = GameData.InteractData.GetItemLootList()        
EA_Window_ChooseOneLoot.lootDataDisplayOrder = {}

for lootIndex, itemData in ipairs( EA_Window_ChooseOneLoot.lootData )
...

See also