diff Modules/Events.lua @ 49:9ff6a3b02332 ticket7

I have changed my mind, price distribution will always be based on the AH price, unless none is available, then all items have the same weight which is what was being done before.
author Asa Ayers <Asa.Ayers@Gmail.com>
date Wed, 21 Jul 2010 01:00:14 -0700
parents 5e981c1df761
children 9c95158236d1
line wrap: on
line diff
--- a/Modules/Events.lua	Tue Jul 20 00:12:44 2010 -0700
+++ b/Modules/Events.lua	Wed Jul 21 01:00:14 2010 -0700
@@ -224,7 +224,7 @@
 	self.lastInventory = self:GetCurrentInventory()
 end
 
-local function distributeValueByAHValue(self, totalValue, targetItems)
+local function distributeValue(self, totalValue, targetItems)
 	
 	local weights = {}
 	local totalWeight = 0
@@ -247,18 +247,6 @@
 	end
 end
 
-local function distributeValue(self, totalValue, targetItems)
-	if true then
-		return distributeValueByAHValue(self, totalValue, targetItems)
-	else
-		local valuePerItem = totalChange / positiveCount
-			
-		for link, change in pairs(targetItems) do
-			self:SaveValue(link, valuePerItem * change, change)
-		end
-	end
-end
-
 function addon:UpdateAudit()
 	-- self:Debug("UpdateAudit " .. event)
 	local currentInventory = self:GetCurrentInventory()