From 22bf29b42a009c05c139e2b85e5440d940b61d77 Mon Sep 17 00:00:00 2001 From: ackis Date: Wed, 21 Jan 2009 17:50:29 +0000 Subject: [PATCH] Add in profession checking for the text-dump... well I don't check the profession, I just pass it now and print it out, not sure if that'll actually work however, since all this shit is 100% dry-coded. Oh yah I also changed the mine info thingy to work with the new code. Fo' drizzle! --- ARLFrame.lua | 11 +++++++++-- AckisRecipeList.lua | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/ARLFrame.lua b/ARLFrame.lua index 6c0d5cf..d289c1e 100644 --- a/ARLFrame.lua +++ b/ARLFrame.lua @@ -4329,9 +4329,16 @@ end -- Creates a frame where you can copy and paste contents from. Adds the textdump text into that frame. -- Code stolen from Antiarc and Chatter -function addon:DisplayTextDump(RecipeDB) +function addon:DisplayTextDump(RecipeDB, profession, text) - local textdump = self:GetTextDump(RecipeDB) + local textdump + + -- If we don't send in a RecipeDB and profession, just dump the text + if (not RecipeDB and profession) then + textdump = text + else + textdump = self:GetTextDump(RecipeDB) + end local PaneBackdrop = { bgFile = [[Interface\DialogFrame\UI-DialogBox-Background]], diff --git a/AckisRecipeList.lua b/AckisRecipeList.lua index 5da33ee..74315f2 100644 --- a/AckisRecipeList.lua +++ b/AckisRecipeList.lua @@ -1742,7 +1742,7 @@ do local sortedindex = self:SortMissingRecipes(RecipeList) if (textdump == true) then - self:DisplayTextDump(RecipeList) + self:DisplayTextDump(RecipeList, playerData.playerProfession) else self:CreateFrame(RecipeList, sortedindex, playerData, AllSpecialtiesTable, TrainerList, VendorList, QuestList, ReputationList, @@ -2071,7 +2071,14 @@ function addon:GetTextDump(RecipeDB, profession) local texttable = {} + local profspellid = GetSpellInfo(profession) + + --@debug@ + self:Print("DEBUG: Getting text dumb for: " .. profession .. "(" .. profspellid .. ")") + --@end-debug@ + -- Add a header to the text table + tinsert(texttable,format("Ackis Recipe List Text Dump for %s",profession)) tinsert(texttable,"Text output of all recipes and acquire information. Output is in the form of comma seperated values.\n") tinsert(texttable,"Spell ID, Recipe Name, Skill Level, ARL Filter Flags, Acquire Methods, Known\n") @@ -2161,7 +2168,7 @@ function addon:MineSkillLevelData() local skillleveltext = "\"" .. name .. "\" => " .. skilllevel .. "," tinsert(t,skillleveltext) end - --self:DisplayTextDump(tconcat(t,"\n")) + self:DisplayTextDump(nil,nil,tconcat(t,"\n")) else self:Print("This can only be used for a trade skill trainer. Dumbass.") end -- 1.7.9.5