Quantcast

Optimize the text dump a bit.

ackis [01-20-09 - 20:24]
Optimize the text dump a bit.
Filename
ARLFrame.lua
AckisRecipeList.lua
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,