Skip to content

Commit

Permalink
Fix 'lotall' and 'passall' to not re-lot/pass.
Browse files Browse the repository at this point in the history
  • Loading branch information
bsb002-flash-tester committed Nov 29, 2022
1 parent 957d9d2 commit d55dac8
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions addons/Treasury/Treasury.lua
Original file line number Diff line number Diff line change
Expand Up @@ -289,19 +289,28 @@ windower.register_event('addon command', function(command1, command2, ...)
elseif command1 == 'done' then
local lots = windower.ffxi.get_party().p0.lots
for slot_index, _ in pairs(windower.ffxi.get_items('treasure')) do
-- Pass if we haven't lotted or passed.
if lots[slot_index] == nil then
windower.ffxi.pass_item(slot_index)
end
end

elseif command1 == 'passall' then
local lots = windower.ffxi.get_party().p0.lots
for slot_index, _ in pairs(windower.ffxi.get_items('treasure')) do
windower.ffxi.pass_item(slot_index)
-- Pass if we haven't passed (will pass if lotted).
if lots[slot_index] == nil or type(lots[slot_index]) == 'number' then
windower.ffxi.pass_item(slot_index)
end
end

elseif command1 == 'lotall' then
local lots = windower.ffxi.get_party().p0.lots
for slot_index, _ in pairs(windower.ffxi.get_items('treasure')) do
windower.ffxi.lot_item(slot_index)
-- Lot if we haven't lotted or passed.
if lots[slot_index] == nil then
windower.ffxi.lot_item(slot_index)
end
end

elseif command1 == 'clearall' then
Expand Down

0 comments on commit d55dac8

Please sign in to comment.