From 6ddf11fb6d4b8500408f576478e0fe9cbddf2268 Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Tue, 13 Apr 2010 23:49:41 -0400 Subject: [PATCH] Moved trainer-only recipe check from addon:PrintScanResults() to addon:TooltipScanRecipe(), since recipes with no item never reach the former function. --- Scanner.lua | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Scanner.lua b/Scanner.lua index dec29ce..748cf08 100644 --- a/Scanner.lua +++ b/Scanner.lua @@ -1412,10 +1412,16 @@ do elseif not item_id then -- We are dealing with a recipe that does not have an item to learn it from. -- Lets check the recipe flags to see if we have a data error and the item should exist - if not recipe:IsFlagged("common1", "RETIRED") - and (recipe:IsFlagged("common1", "VENDOR") or recipe:IsFlagged("common1", "INSTANCE") or recipe:IsFlagged("common1", "RAID")) then + if not recipe:IsFlagged("common1", "RETIRED") then + if (recipe:IsFlagged("common1", "VENDOR") or recipe:IsFlagged("common1", "INSTANCE") or recipe:IsFlagged("common1", "RAID")) then tinsert(output, string.format("%s: %d", recipe.name, spell_id)) tinsert(output, " No match found in the SPELL_TO_RECIPE_MAP table.") + elseif recipe:IsFlagged("common1", "TRAINER") and recipe.quality ~= private.item_qualities["COMMON"] then + local QS = private.item_quality_names + + tinsert(output, string.format("%s: %d", recipe.name, spell_id)) + tinsert(output, string.format(" Wrong quality: Q.%s - should be Q.COMMON.", QS[recipe.quality])) + end end end ARLDatamineTT:Hide() @@ -1983,12 +1989,7 @@ do tinsert(output, string.format(" Extra Specialty: %s", recipe.specialty)) end - if recipe:IsFlagged("common1", "TRAINER") and not SPELL_TO_RECIPE_MAP[recipe.spell_id] and recipe.quality ~= private.item_qualities["COMMON"] then - local QS = private.item_quality_names - - found_problem = true - tinsert(output, string.format(" Wrong quality: Q.%s - should be Q.COMMON.", QS[recipe.quality])) - elseif scan_data.quality ~= recipe.quality then + if scan_data.quality ~= recipe.quality then local QS = private.item_quality_names found_problem = true -- 1.7.9.5