From 26b21a381b695bbe4ad90f8fe057a6a1617291bb Mon Sep 17 00:00:00 2001 From: ackis Date: Tue, 20 Jan 2009 20:24:47 +0000 Subject: [PATCH] Optimize the text dump a bit. --- ARLFrame.lua | 13 ++++++------- AckisRecipeList.lua | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ARLFrame.lua b/ARLFrame.lua index 17b5e76..cd41587 100644 --- a/ARLFrame.lua +++ b/ARLFrame.lua @@ -2018,18 +2018,15 @@ function addon:SwitchProfs(button) end end + NumSkillLines = GetNumSkillLines() + -- @debug@ - self:Print("DEBUG: Switching professions, getting skill level for: " .. currentProfession) + self:Print("DEBUG: Switching professions, getting skill level for: " .. currentProfession .. " (" .. NumSkillLines .. ") skills to examine.") --@end-debug@ - NumSkillLines = GetNumSkillLines() - -- Get the skill level for i=1,NumSkillLines,1 do local skillName,_,_,skillRank = GetSkillLineInfo(i) - -- @debug@ - self:Print("DEBUG: Switching professions, examining: " .. skillName .. " (" .. skillRank .. ")") - --@end-debug@ if (skillName == currentProfession) then -- @debug@ self:Print("DEBUG: Switching professions, found new skill level for: " .. skillName .. " (" .. skillRank .. ")") @@ -4335,7 +4332,9 @@ 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(textdump) +function addon:DisplayTextDump(RecipeDB) + + local textdump = self:GetTextDump(RecipeDB) local PaneBackdrop = { bgFile = [[Interface\DialogFrame\UI-DialogBox-Background]], diff --git a/AckisRecipeList.lua b/AckisRecipeList.lua index 2279c8d..5a5eb85 100644 --- a/AckisRecipeList.lua +++ b/AckisRecipeList.lua @@ -1742,7 +1742,7 @@ do local sortedindex = self:SortMissingRecipes(RecipeList) if (textdump == true) then - local temptext = self:GetTextDump(RecipeList) + local temptext = self:DisplayTextDump(RecipeList) self:DisplayTextDump(temptext) else self:CreateFrame(RecipeList, sortedindex, playerData, AllSpecialtiesTable, -- 1.7.9.5