Merge pull request #12 from avirar/master
Added slash command to control undercutting (enable/disable toggle)
This commit is contained in:
@@ -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 = {},
|
||||
|
||||
+5
-1
@@ -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
|
||||
end
|
||||
|
||||
+3
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user