diff --git a/aux-addon.lua b/aux-addon.lua index b86e066..79341ba 100644 --- a/aux-addon.lua +++ b/aux-addon.lua @@ -59,6 +59,7 @@ function handle.LOAD() crafting_cost = true, post_bid = false, post_duration = post.DURATION_24, + post_stack = true, items = {}, item_ids = {}, auctionable_items = {}, diff --git a/core/slash.lua b/core/slash.lua index 5adb2f9..a8b5b9b 100644 --- a/core/slash.lua +++ b/core/slash.lua @@ -21,6 +21,9 @@ function SlashCmdList.AUX(command) elseif arguments[1] == 'ignore' and arguments[2] == 'owner' then aux.account_data.ignore_owner = not aux.account_data.ignore_owner aux.print('ignore owner ' .. status(aux.account_data.ignore_owner)) + elseif arguments[1] == 'post' and arguments[2] == 'stack' then + aux.account_data.post_stack = not aux.account_data.post_stack + aux.print('post stack ' .. status(aux.account_data.post_stack)) elseif arguments[1] == 'post' and arguments[2] == 'bid' then aux.account_data.post_bid = not aux.account_data.post_bid aux.print('post bid ' .. status(aux.account_data.post_bid)) @@ -61,6 +64,7 @@ function SlashCmdList.AUX(command) aux.print('- ignore owner [' .. status(aux.account_data.ignore_owner) .. ']') aux.print('- post bid [' .. status(aux.account_data.post_bid) .. ']') aux.print('- post duration [' .. aux.color.blue(aux.account_data.post_duration / 60 .. 'h') .. ']') + aux.print('- post stack [' .. status(aux.account_data.post_stack) .. ']') aux.print('- crafting cost [' .. status(aux.account_data.crafting_cost) .. ']') aux.print('- tooltip value [' .. status(tooltip_settings.value) .. ']') aux.print('- tooltip daily [' .. status(tooltip_settings.daily) .. ']') diff --git a/core/tooltip.lua b/core/tooltip.lua index 4d7919d..8fbc32e 100644 --- a/core/tooltip.lua +++ b/core/tooltip.lua @@ -155,10 +155,12 @@ function game_tooltip_hooks:SetInboxItem(index) local name, _, quantity = GetInboxItem(index) local id = name and info.item_id(name) if id then - local _, itemstring, quality = GetItemInfo(id) - local hex = aux.select(4, GetItemQualityColor(tonumber(quality))) - local link = hex .. '|H' .. itemstring .. '|h[' .. name .. ']|h' .. FONT_COLOR_CODE_CLOSE - extend_tooltip(GameTooltip, link, quantity) + local _, itemstring, quality = (id) + if quality and itemstring then + local hex = aux.select(4, GetItemQualityColor(tonumber(quality))) + local link = hex .. '|H' .. itemstring .. '|h[' .. name .. ']|h' .. FONT_COLOR_CODE_CLOSE + extend_tooltip(GameTooltip, link, quantity) + end end end diff --git a/tabs/post/core.lua b/tabs/post/core.lua index 08a3581..e7db5f1 100644 --- a/tabs/post/core.lua +++ b/tabs/post/core.lua @@ -431,23 +431,28 @@ function update_item(item) UIDropDownMenu_SetSelectedValue(duration_dropdown, settings.duration) hide_checkbox:SetChecked(settings.hidden) + local ii = 1 - if selected_item.max_charges then - for i = selected_item.max_charges, 1, -1 do + if selected_item.max_charges then + for i = selected_item.max_charges, 1, -1 do if selected_item.availability[i] > 0 then stack_size_slider:SetMinMaxValues(1, i) ii=i break end - end - else + end + else ii = min(selected_item.max_stack, selected_item.aux_quantity) - stack_size_slider:SetMinMaxValues(1, min(selected_item.max_stack, selected_item.aux_quantity)) - end - - stack_size_slider:SetValue(math.random(1,ii)) - --stack_size_slider:SetValue(aux.huge) - --stack_size_slider:SetValue(1) + stack_size_slider:SetMinMaxValues(1, min(selected_item.max_stack, selected_item.aux_quantity)) + end + + if not aux.account_data.post_stack then + stack_size_slider:SetValue(math.random(1,ii)) + else + stack_size_slider:SetValue(aux.huge) + --stack_size_slider:SetValue(1) + end + quantity_update(true) unit_start_price_input:SetText(money.to_string(settings.start_price, true, nil, nil, true))