diff --git a/aux-addon.lua b/aux-addon.lua index 2ae6aa2..a63dae2 100644 --- a/aux-addon.lua +++ b/aux-addon.lua @@ -67,6 +67,7 @@ function handle.LOAD() post_bid = false, post_duration = post.DURATION_24, post_stack = true, + undercut = true, items = {}, item_ids = {}, auctionable_items = {}, diff --git a/core/slash.lua b/core/slash.lua index 83a63d7..cb3978c 100644 --- a/core/slash.lua +++ b/core/slash.lua @@ -22,6 +22,9 @@ function SlashCmdList.AUX(command) local scale = tonumber(arguments[2]) aux.frame:SetScale(scale) aux.account_data.scale = scale + elseif arguments[1] == 'uc' then + aux.account_data.undercut = not aux.account_data.undercut + aux.print('undercutting ' .. status(aux.account_data.undercut)) 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)) @@ -77,6 +80,7 @@ function SlashCmdList.AUX(command) aux.print('Usage:') aux.print('- scale [' .. aux.color.blue(aux.account_data.scale) .. ']') aux.print('- ignore owner [' .. status(aux.account_data.ignore_owner) .. ']') + aux.print('- uc [' .. status(aux.account_data.undercut) .. ']') aux.print('- post bid [' .. status(aux.account_data.post_bid) .. ']') aux.print('- post duration [' .. aux.color.blue(aux.account_data.post_duration / 60 * 3 .. 'h') .. ']') aux.print('- post stack [' .. status(aux.account_data.post_stack) .. ']') @@ -94,4 +98,4 @@ function SlashCmdList.AUX(command) aux.color[aux.account_data.theme == 'modern' and 'green' or 'red']('modern') .. ']') aux.print('- show hidden [' .. status(aux.account_data.showhidden) .. ']') end -end \ No newline at end of file +end diff --git a/tabs/post/core.lua b/tabs/post/core.lua index b2f8897..b6b6bf9 100644 --- a/tabs/post/core.lua +++ b/tabs/post/core.lua @@ -390,7 +390,9 @@ end function undercut(record, stack_size, stack) local price = ceil(record.unit_price * (stack and record.stack_size or stack_size)) if not record.own then - price = price - 1 + if aux.account_data.undercut then + price = price - 1 + end end return price / stack_size end