From 048fcdba2b65ab933404ebf8c569c45851d93624 Mon Sep 17 00:00:00 2001 From: ackis Date: Thu, 26 Mar 2009 19:38:34 +0000 Subject: [PATCH] Make a function called DumpRecipe, which poops the recipe out into chat, gonna be used to debugger something methinks. --- AckisRecipeList.lua | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/AckisRecipeList.lua b/AckisRecipeList.lua index 5e25292..939ec9b 100644 --- a/AckisRecipeList.lua +++ b/AckisRecipeList.lua @@ -2185,3 +2185,37 @@ function addon:ScanSkillLevelData() end end + +-- Description: Dumps all the info about a recipe out to chat +-- Expected Result: Recipe info dumped in chat +-- Input: Spell ID of the recipe +-- Output: Text in chat window + +function addon:DumpRecipe(SpellID) + + local recipelist = addon:GetRecipeTable() + + if (recipelist[SpellID]) then + + x = recipelist[SpellID] + self:Print(x["Name"] .. "(" .. x["Level"] .. ") -- " .. SpellID) + self:Print("Rarity: " .. x["Rarity"]) + if (x["Specialty"]) then + self:Print("Profession: " .. x["Profession"] .. "(" .. x["Specialty"] .. ")") + else + self:Print("Profession: " .. x["Profession"]) + end + if (x["ItemID"]) then + self:Print("Creates: " .. x["ItemID"]) + end + if (x["Locations"]) then + self:Print("Located: " .. x["Locations"]) + end + + local flags = x["Flags"] + + else + self:Print("DEBUG: Spell ID not in recipe database.") + end + +end -- 1.7.9.5