changeset 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 8e9beb8a0330
files CHANGELOG.txt Core.lua Modules/QuickAuctions.lua
diffstat 3 files changed, 20 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGELOG.txt	Wed Jul 28 22:19:38 2010 -0700
+++ b/CHANGELOG.txt	Wed Jul 28 22:46:13 2010 -0700
@@ -3,7 +3,8 @@
 - Fixed a bug with the crafting threshold options.
 - Updated /ia queue so that it is a shortcut to using /ia crafting and then clicking export.
 - Added integration with ArkInventory. You can set up rules that use "itemauditor('profitable')" or "itemauditor('qa')" to find items managed by QuickAuctions.
-- Added a public API so other addon developers can register themselves as a queue destination and added a UI so users can change that destination.
+- Added a public API so other addon developers can register themselves as a queue destination and added a UI so users can select that destination.
+- 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.
 
 2010-07-27  Asa Ayers  <Asa.Ayers@Gmail.com>
 
--- a/Core.lua	Wed Jul 28 22:19:38 2010 -0700
+++ b/Core.lua	Wed Jul 28 22:46:13 2010 -0700
@@ -50,6 +50,7 @@
 			use_quick_auctions = false,
 			crafting_threshold = 1,
 			auction_threshold = 0.15,
+			qa_extra = 0,
 			output_chat_frame = nil,
 		},
 		profile = {
--- 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,