diff Modules/QuickAuctions.lua @ 71:aaf9a155995b

Added a config option to control how many extra copies of an item are created if its being managed with QA. The previous behaveior was to add 25% to whatever QA would normally post. Now it defaults to 0% and is user configurable.
author Asa Ayers <Asa.Ayers@Gmail.com>
date Wed, 28 Jul 2010 22:46:13 -0700
parents 3930518cb8d9
children a8fc802b42ba
line wrap: on
line diff
--- a/Modules/QuickAuctions.lua	Wed Jul 28 22:19:38 2010 -0700
+++ b/Modules/QuickAuctions.lua	Wed Jul 28 22:46:13 2010 -0700
@@ -101,7 +101,7 @@
 			stackSize = stackSize / GetTradeSkillNumMade(data.tradeSkillIndex)
 			
 			-- bonus
-			stackSize = ceil(stackSize *1.25)
+			stackSize = ceil(stackSize * (1+ItemAuditor.db.char.qa_extra))
 			
 			local newThreshold = ((data.cost*stackSize) + currentInvested) / (currentCount + stackSize)
 			newThreshold = calculateQAThreshold(newThreshold)
@@ -210,7 +210,22 @@
 			get = function() return ItemAuditor.db.char.auction_threshold end,
 			set = function(info, value)
 				ItemAuditor.db.char.auction_threshold = value
-				ItemAuditor:RefreshQAGroups()
+				-- ItemAuditor:RefreshQAGroups()
+			end,
+			disabled = 'IsQADisabled',
+			order = 1,
+		},
+		extra = {
+			type = "range",
+			name = "Create Extra",
+			desc = "This is the amount of an item that should be created above what you sell in one post in QuickAuctions."..
+				"If you sell 4 stacks of 5 of an item and your extra is 25%, it will queue enough for you to have 25 of that item.",
+			min = 0.0,
+			max = 1.0,
+			isPercent = true,
+			get = function() return ItemAuditor.db.char.qa_extra end,
+			set = function(info, value)
+				ItemAuditor.db.char.qa_extra = value
 			end,
 			disabled = 'IsQADisabled',
 			order = 1,