diff ReagentMaker.lua @ 93:c369a2e16ab6

Added prospecting and common data
author contrebasse
date Thu, 19 May 2011 20:25:41 +0200
parents 6a91e19275c8
children b980c00affcd
line wrap: on
line diff
--- a/ReagentMaker.lua	Tue May 17 18:35:24 2011 +0200
+++ b/ReagentMaker.lua	Thu May 19 20:25:41 2011 +0200
@@ -128,14 +128,14 @@
 
 	-- If only one recipe is known for the reagent, use it
 	if #(A.data[reagentID]) == 1 and not A.data[reagentID][1].macro then
-		if A.data[reagentID][1].spellName ~= GetTradeSkillLine() then
+		if A.data[reagentID][1].spellName and A.data[reagentID][1].spellName ~= GetTradeSkillLine() then
 			A.Error(A.L["The recipe to make this reagent is in another tradeskill. Currently ReagentMaker can not manage such a case, sorry."])
 			return
 		end
-	
+
 		local numMakable, reagentIndex = A.numMakable(reagentID)
 
-		-- Try to show the recipe once if it was not found
+		-- Try to show the recipe by removing filters once if it was not found
 		if not reagentIndex then
 			A.SaveActiveFilters(A.data[reagentID][1].header)
 			numMakable, reagentIndex = A.numMakable(reagentID)
@@ -152,7 +152,7 @@
 
 		-- If we can make the item needed to make the reagent, open a window to make it
 		-- one step recursion, enables to mill to create an ink
-		if (not A.data[reagentID][1].manyReagents) and A.data[A.data[reagentID][1][1]] then
+		if A.data[reagentID][1][1] and A.data[A.data[reagentID][1][1]] then
 			if A.externalCraftWindow(A.data[reagentID][1][1],reagentID) ~= false then
 				return
 			end