# HG changeset patch # User Asa Ayers # Date 1283223161 25200 # Node ID 1cb0027da35c71ab7940c50ecdec3f7ee684b258 # Parent cf160210433c04bde7490b921911171de2c53f3d Added an absolute Auction Threshold option. This will allow you to set your threshold at 10g (or whatever you choose) over your cost for all items. diff -r cf160210433c -r 1cb0027da35c CHANGELOG.txt --- a/CHANGELOG.txt Mon Aug 30 12:02:17 2010 -0700 +++ b/CHANGELOG.txt Mon Aug 30 19:52:41 2010 -0700 @@ -1,6 +1,7 @@ 2010-08-30 Asa Ayers - Updated Total Cost in /ia crafting to include the AH cut based on the price column. This will also reduce the profit column to consider the additional cost. +- Added an absolute Auction Threshold option. This will allow you to set your threshold at 10g (or whatever you choose) over your cost for all items. 2010-08-27 Asa Ayers diff -r cf160210433c -r 1cb0027da35c Core.lua --- a/Core.lua Mon Aug 30 12:02:17 2010 -0700 +++ b/Core.lua Mon Aug 30 19:52:41 2010 -0700 @@ -48,6 +48,7 @@ use_quick_auctions = false, profitable_threshold = 10000, auction_threshold = 0.15, + auction_threshold_value = 0, qa_extra = 0, output_chat_frame = nil, cod_warnings = true, diff -r cf160210433c -r 1cb0027da35c Modules/QuickAuctions.lua --- a/Modules/QuickAuctions.lua Mon Aug 30 12:02:17 2010 -0700 +++ b/Modules/QuickAuctions.lua Mon Aug 30 19:52:41 2010 -0700 @@ -67,7 +67,9 @@ -- add my minimum profit margin -- GetAuctionThreshold returns a percent as a whole number. This will convert 25 to 1.25 - copper = copper * (1+ItemAuditor:GetAuctionThreshold()) + local min_by_percent = copper * (1+ItemAuditor:GetAuctionThreshold()) + local min_by_value = copper + ItemAuditor.db.char.auction_threshold_value + copper = max(min_by_percent, min_by_value) -- add AH Cut local keep = 1 - ItemAuditor:GetAHCut() @@ -197,20 +199,67 @@ set = "SetQAEnabled", order = 0, }, + enable_percent = { + type = "toggle", + name = "Use percent to calculate threshold.", + get = function() return ItemAuditor.db.char.auction_threshold > 0 end, + set = function(info, value) + value = value and 0.15 or 0 + ItemAuditor.db.char.auction_threshold = value + end, + order = 1, + }, auction_threshold = { type = "range", name = "Auction Threshold", - desc = "Don't create items that will make less than this amount of profit", + desc = "Don't sell items for less than this amount of profit.", min = 0.0, max = 1.0, isPercent = true, + hidden = function() return ItemAuditor.db.char.auction_threshold == 0 end, get = function() return ItemAuditor.db.char.auction_threshold end, set = function(info, value) ItemAuditor.db.char.auction_threshold = value -- ItemAuditor:RefreshQAGroups() end, disabled = 'IsQADisabled', - order = 1, + order = 2, + }, + enable_absolute = { + type = "toggle", + name = "Use value to calculate threshold.", + get = function() return ItemAuditor.db.char.auction_threshold_value > 0 end, + set = function(info, value) + value = value and 100000 or 0 + ItemAuditor.db.char.auction_threshold_value = value + end, + order = 3, + }, + auction_threshold_absolute = { + type = "input", + name = "Auction Threshold", + desc = "Don't sell items for less than this amount of profit.", + hidden = function() return ItemAuditor.db.char.auction_threshold_value == 0 end, + get = function() return + Utils.FormatMoney(ItemAuditor.db.char.auction_threshold_value , '', true) + end, + validate = function(info, value) + if not Utils.validateMoney(value) then + return "Invalid money format" + end + return true + end, + set = function(info, value) + ItemAuditor.db.char.auction_threshold_value = Utils.parseMoney(value) + end, + usage = "###g ##s ##c", + disabled = 'IsQADisabled', + order = 4, + }, + header = { + type = 'header', + name = '', + order = 9, }, extra = { type = "range", @@ -225,7 +274,7 @@ ItemAuditor.db.char.qa_extra = value end, disabled = 'IsQADisabled', - order = 1, + order = 10, }, refresh_qa = { type = "execute", @@ -233,7 +282,7 @@ desc = "Resets all Quick Auctions thresholds", func = "RefreshQAGroups", disabled = 'IsQADisabled', - order = 9, + order = 15, }, } }