From 867170edf543a9fe10502ac49bf267e831fb5cab Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Tue, 13 Apr 2010 22:55:34 -0400 Subject: [PATCH] In addon:ScanTrainerData(): Fixed output logic. --- Scanner.lua | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/Scanner.lua b/Scanner.lua index 115cdd3..dec29ce 100644 --- a/Scanner.lua +++ b/Scanner.lua @@ -714,9 +714,7 @@ do local teachflag = false local noteachflag = false - for i in pairs(recipe_list) do - local recipe = recipe_list[i] - local i_name = recipe.name + for spell_id, recipe in pairs(recipe_list) do local train_data = recipe.acquire_data[A.TRAINER] local found = false @@ -729,16 +727,20 @@ do end end - if info[i_name] and not found then - tinsert(teach, i) - teachflag = true + if info[recipe.name] then + if not found then + tinsert(teach, spell_id) + teachflag = true - if not recipe:IsFlagged("common1", "TRAINER") then - tinsert(output, ": Trainer flag needs to be set.") + if not recipe:IsFlagged("common1", "TRAINER") then + tinsert(output, ": Trainer flag needs to be set.") + end + end + else + if found then + noteachflag = true + tinsert(noteach, spell_id) end - elseif found then - noteachflag = true - tinsert(noteach, i) end end -- 1.7.9.5