From a79723623eeef74a9ff74d8714b72de4434ad49b Mon Sep 17 00:00:00 2001 From: ackis Date: Tue, 9 Jun 2009 17:19:40 +0000 Subject: [PATCH] Move some of the error checking code into alphas (stuff torhal added last night). The missing entry in the lookup tables now returns in all versions (aka errors out peacefully because by the time someone reports it, it's already fixed) and prints an error in alphas. --- AckisRecipeList.lua | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/AckisRecipeList.lua b/AckisRecipeList.lua index d047dd1..827ed18 100644 --- a/AckisRecipeList.lua +++ b/AckisRecipeList.lua @@ -536,10 +536,13 @@ function addon:addTradeSkill(RecipeDB, SpellID, SkillLevel, ItemID, Rarity, Prof local profession_id = GetSpellInfo(Profession) local recipe_name = GetSpellInfo(SpellID) + --@alpha@ if RecipeDB[SpellID] then self:Print("Duplicate recipe: "..profession_id.." "..tostring(SpellID).." "..recipe_name) return end + --@end-alpha@ + ------------------------------------------------------------------------------- -- Create a table inside the RecipeListing table which stores all information -- about a recipe @@ -1534,12 +1537,12 @@ do -- Trainer if (recipe_acquire[i]["Type"] == 1) then if (TrainerList) then - --@alpha@ if (not TrainerList[recipe_acquire[i]["ID"]]) then + --@alpha@ self:Print("Missing trainer in database: " .. recipe_acquire[i]["ID"]) + --@end-alpha@ return end - --@end-alpha@ local location = TrainerList[recipe_acquire[i]["ID"]]["Location"] if (not location_checklist[location]) then -- Add the location to the list @@ -1550,11 +1553,13 @@ do -- Vendor elseif (recipe_acquire[i]["Type"] == 2) then if (VendorList) then - --@alpha@ if (not VendorList[recipe_acquire[i]["ID"]]) then + --@alpha@ self:Print("Missing vendor in database: " .. recipe_acquire[i]["ID"]) + --@end-alpha@ + return end - --@end-alpha@ + local location = VendorList[recipe_acquire[i]["ID"]]["Location"] if (not location_checklist[location]) then -- Add the location to the list @@ -1565,11 +1570,12 @@ do -- Mob Drop elseif (recipe_acquire[i]["Type"] == 3) then if (MobList) then - --@alpha@ if (not MobList[recipe_acquire[i]["ID"]]) then + --@alpha@ self:Print("Missing mob in database: " .. recipe_acquire[i]["ID"]) + --@end-alpha@ + return end - --@end-alpha@ local location = MobList[recipe_acquire[i]["ID"]]["Location"] if (not location_checklist[location]) then -- Add the location to the list @@ -1580,11 +1586,12 @@ do -- Quest elseif (recipe_acquire[i]["Type"] == 4) then if (QuestList) then - --@alpha@ if (not QuestList[recipe_acquire[i]["ID"]]) then + --@alpha@ self:Print("Missing quest in database: " .. recipe_acquire[i]["ID"]) + --@end-alpha@ + return end - --@end-alpha@ local location = QuestList[recipe_acquire[i]["ID"]]["Location"] if (not location_checklist[location]) then -- Add the location to the list -- 1.7.9.5