Quantcast

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!

ackis [01-21-09 - 17:50]
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!
Filename
ARLFrame.lua
AckisRecipeList.lua
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