Quantcast

Move that debug code from the database scan to specific recipe scan, it makes more sense to go there.

ackis [08-11-09 - 19:13]
Move that debug code from the database scan to specific recipe scan, it makes more sense to go there.
Filename
ARLDatamine.lua
diff --git a/ARLDatamine.lua b/ARLDatamine.lua
index 8cc5361..7392539 100644
--- a/ARLDatamine.lua
+++ b/ARLDatamine.lua
@@ -1090,35 +1090,6 @@ function addon:TooltipScanDatabase()
 	-- Parse the entire recipe database
 	for i in pairs(recipe_list) do

-		-- Check for game version
-		local Game = i["Game"]
-		recipe_name = i["Name"]
-		if (not Game) then
-			tinsert(t,"No expansion information: " .. tostring(i) .. " " .. recipe_name)
-		elseif (Game > 2) then
-			tinsert(t,"Expansion information too high: " .. tostring(i) .. " " .. recipe_name)
-		end
-
-		local Orange = i["Orange"]
-		local Yellow = i["Yellow"]
-		local Green = i["Green"]
-		local Grey = i["Grey"]
-		local SkillLevel = i["Level"]
-
-		-- No skill level information
-		if (not Orange) then
-			tinsert(t,"No skill level information: " .. tostring(i) .. " " .. recipe_name)
-		else
-			-- Highest level is greater than the skill of the recipe
-			if (Orange > SkillLevel) then
-				tinsert(t,"Skill Level Error (Orange > Skill): " .. tostring(i) .. " " .. recipe_name)
-			end
-			-- Level info is messed up
-			if (Orange > Yellow) or (Orange > Green) or (Orange > Grey) or (Yellow > Green) or (Yellow > Grey) or (Green > Grey) then
-				tinsert(t,"Skill Level Error: " .. tostring(i) .. " " .. recipe_name)
-			end
-		end
-
 		local ttscantext = addon:TooltipScanRecipe(i,false,true)
 		if (ttscantext) then
 			tinsert(t,ttscantext)
@@ -1151,6 +1122,34 @@ function addon:TooltipScanRecipe(spellid,is_vendor,is_largescan)
 	if (recipe_list[spellid]) then
 		local recipe_name = recipe_list[spellid]["Name"]
 		local recipe_link = recipe_list[spellid]["RecipeLink"]
+		-- Check for game version
+		local Game = spellid["Game"]
+		recipe_name = spellid["Name"]
+		if (not Game) then
+			tinsert(t,"No expansion information: " .. tostring(spellid) .. " " .. recipe_name)
+		elseif (Game > 2) then
+			tinsert(t,"Expansion information too high: " .. tostring(spellid) .. " " .. recipe_name)
+		end
+
+		local Orange = spellid["Orange"]
+		local Yellow = spellid["Yellow"]
+		local Green = spellid["Green"]
+		local Grey = spellid["Grey"]
+		local SkillLevel = spellid["Level"]
+
+		-- No skill level information
+		if (not Orange) then
+			tinsert(t,"No skill level information: " .. tostring(spellid) .. " " .. recipe_name)
+		else
+			-- Highest level is greater than the skill of the recipe
+			if (Orange > SkillLevel) then
+				tinsert(t,"Skill Level Error (Orange > Skill): " .. tostring(spellid) .. " " .. recipe_name)
+			end
+			-- Level info is messed up
+			if (Orange > Yellow) or (Orange > Green) or (Orange > Grey) or (Yellow > Green) or (Yellow > Grey) or (Green > Grey) then
+				tinsert(t,"Skill Level Error: " .. tostring(spellid) .. " " .. recipe_name)
+			end
+		end

 		-- If a link exists,we'll scan it.
 		if (recipe_link) then