Quantcast

Add a fix for duplicate entries for reputations.

ackis [05-26-09 - 17:36]
Add a fix for duplicate entries for reputations.
Filename
AckisRecipeList.lua
diff --git a/AckisRecipeList.lua b/AckisRecipeList.lua
index d79e88f..2ffa710 100644
--- a/AckisRecipeList.lua
+++ b/AckisRecipeList.lua
@@ -769,14 +769,7 @@ function addon:addTradeAcquire(RecipeDB, SpellID, ...)
 		acquire[index]["ID"] = AcquireID

 		--@debug@
-		self:Print(AcquireID)
-		-- We haven't seen this Acquire ID before (trainer ID, etc)
-		if (not AcquireIDList[AcquireID]) then
-			AcquireIDList[AcquireID] = true
-			self:Print("Adding")
-		else
-			self:Print("Duplicate entry: " .. SpellID .. " AcquireID: " .. AcquireID)
-		end
+		local AcquireIDNumber = AcquireID
 		--@end-debug@

 		i = i + 2
@@ -787,10 +780,26 @@ function addon:addTradeAcquire(RecipeDB, SpellID, ...)
 			acquire[index]["RepLevel"] = RepLevel
 			acquire[index]["RepVendor"] = RepVendor
 			i = i + 2
+
+			--@debug@
+			AcquireIDNumber = RepVendor
+			--@end-debug@
+
 		end

 		index = index + 1

+		--@debug@
+		self:Print(AcquireIDNumber)
+		-- We haven't seen this Acquire ID before (trainer ID, etc)
+		if (not AcquireIDList[AcquireIDNumber]) then
+			AcquireIDList[AcquireIDNumber] = true
+			self:Print("Adding")
+		else
+			self:Print("Duplicate entry: " .. SpellID .. " AcquireID: " .. AcquireIDNumber)
+		end
+		--@end-debug@
+
 	end

 	-- Populate the location field with all the data