changeset 77:a8fc802b42ba

Changed the QuickAuctions decider to consider the number already owned and only calculate based on what needs to be crated. Fixed the QuickAuctions decider to return the number of items to be created instead of the number of times to create. This makes a difference with things like Runescroll of Fortitude where 5 are created at once.
author Asa Ayers <Asa.Ayers@Gmail.com>
date Sun, 01 Aug 2010 08:42:29 -0700
parents 574c154d24ab
children 88a42e00b866
files CHANGELOG.txt Modules/Crafting.lua Modules/QuickAuctions.lua
diffstat 3 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGELOG.txt	Sun Aug 01 08:16:08 2010 -0700
+++ b/CHANGELOG.txt	Sun Aug 01 08:42:29 2010 -0700
@@ -1,6 +1,8 @@
 2010-08-01  Asa Ayers  <Asa.Ayers@Gmail.com>
 
 - Fixed the tooltip so that it is green if the auction price exactly matches your threshold.
+- Changed the QuickAuctions decider to consider the number already owned and only calculate based on what needs to be crated.
+- Fixed the QuickAuctions decider to return the number of items to be created instead of the number of times to create. This makes a difference with things like Runescroll of Fortitude where 5 are created at once.
 
 2010-07-29  Asa Ayers  <Asa.Ayers@Gmail.com>
 
--- a/Modules/Crafting.lua	Sun Aug 01 08:16:08 2010 -0700
+++ b/Modules/Crafting.lua	Sun Aug 01 08:42:29 2010 -0700
@@ -320,6 +320,8 @@
 	winner = lastWinner
 	lastWinner = ""
 	
+	data.queue = ceil(data.queue / GetTradeSkillNumMade(data.tradeSkillIndex))
+	
 	return winner, data.queue
 end
 
--- a/Modules/QuickAuctions.lua	Sun Aug 01 08:16:08 2010 -0700
+++ b/Modules/QuickAuctions.lua	Sun Aug 01 08:42:29 2010 -0700
@@ -98,16 +98,16 @@
 			local threshold, postCap, perAuction = QAAPI:GetGroupConfig(QAGroup)
 			local stackSize = postCap * perAuction
 			
-			stackSize = stackSize / GetTradeSkillNumMade(data.tradeSkillIndex)
-			
 			-- bonus
 			stackSize = ceil(stackSize * (1+ItemAuditor.db.char.qa_extra))
+			local target = stackSize
+			stackSize  = stackSize - currentCount
 			
 			local newThreshold = ((data.cost*stackSize) + currentInvested) / (currentCount + stackSize)
 			newThreshold = calculateQAThreshold(newThreshold)
 			
 			if  newThreshold < data.price then
-				return stackSize
+				return target
 			end
 			
 			return -1