Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:GameData.InteractData.GetClaimWindowList

From RoR Wiki

UI Lua API · Loot functions
Version: WAR 1.4.8

Returns the rewards shown in the account rewards ("claim") window.

rewards = GameData.InteractData.GetClaimWindowList()

Arguments

None.

Returns

rewards
table – Array of reward tables, indexed from 1. Empty if there are no rewards.

Each reward table is an item data table for the reward item, with these extra fields:

Key Type Meaning
rewardStatus number Status of the reward. The stock UI defines the values in ea_claimwindow/source/claimwindow.lua: 0 not received, 1 sent by mail, 2 error sending, 3 not eligible, 4 claimed, 5 has remaining quantity, 6 needs more quantity.
rewardCanReset boolean Whether the reward can be reset with ResetMarketingReward.
rewardSubject wstring Text shown for the reward; the stock UI puts it in the row's subject label.

Details

  • The client keeps two parallel lists for this window: the items and the reward entries. If they have different lengths, the three extra fields are left out and only the item data tables are returned.
  • The index of a reward in this table is the rewardIndex for ClaimMarketingReward and ResetMarketingReward.
  • If the Lua state is not available, the function returns nothing.

Errors

None.

Example

From default/ea_claimwindow/source/claimwindow.lua:

EA_Window_Claim.lootData = GameData.InteractData.GetClaimWindowList()        
EA_Window_Claim.lootDataDisplayOrder = {}

for lootIndex, itemData in ipairs( EA_Window_Claim.lootData ) 
do
    table.insert( EA_Window_Claim.lootDataDisplayOrder, lootIndex )
end   	
...
if(itemData.rewardCanReset == true)

See also