API:LootAllItems
From RoR Wiki
UI Lua API · Loot functions
Version: WAR 1.4.8
Asks the server to give the player every item in the open loot window.
LootAllItems()
Arguments
None.
Returns
Nothing.
Details
- If the current loot list is empty, nothing is sent.
- Otherwise a "loot all" request is sent to the server for the object the player last interacted with.
- Nothing is sent if there is no such object or the connection is not ready.
- Arguments are not checked; anything passed is ignored.
Errors
None.
Example
From default/ea_lootwindow/source/lootwindow.lua. When a loot threshold applies, the stock UI loots items one by one; otherwise it loots everything at once:
for lootIndex, itemData in ipairs( EA_Window_Loot.lootData )
do
if( itemData.rarity < GameData.Player.Group.Settings.lootThreshold )
then
LootItem( lootIndex )
end
end
else
LootAllItems()
end
