diff ReagentMaker.lua @ 85:996aaa818d04 v1.0beta4

Clarify error message with cross-tradeskill, and clarify the use of GetTradeSkillLine() internally
author contrebasse
date Sun, 15 May 2011 12:45:52 +0200
parents cf1da2654dc6
children 6a91e19275c8
line wrap: on
line diff
--- a/ReagentMaker.lua	Sun May 15 12:12:18 2011 +0200
+++ b/ReagentMaker.lua	Sun May 15 12:45:52 2011 +0200
@@ -127,7 +127,12 @@
 	if not reagentID or not A.data[reagentID] then return end
 
 	-- 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 and not A.data[reagentID][1].macro then
+		if A.data[reagentID][1].spellName ~= GetTradeSkillLine() then
+			A.Error(A.L["The recipe to make this reagent is in another tradeskill. Currently RagentMaker 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
@@ -136,7 +141,7 @@
 			numMakable, reagentIndex = A.numMakable(reagentID)
 		end
 
-		if not numMakable then		
+		if not numMakable then
 			A.Error(A.L["The recipe to make the reagent seems to be hidden, it is not makable. Try to remove the filters on the recipes."])
 			return
 		end