Mercurial > wow > reagentmaker
comparison 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 |
comparison
equal
deleted
inserted
replaced
84:10a6078e132f | 85:996aaa818d04 |
---|---|
125 | 125 |
126 -- Continue only if the reagent is known | 126 -- Continue only if the reagent is known |
127 if not reagentID or not A.data[reagentID] then return end | 127 if not reagentID or not A.data[reagentID] then return end |
128 | 128 |
129 -- If only one recipe is known for the reagent, use it | 129 -- If only one recipe is known for the reagent, use it |
130 if #(A.data[reagentID]) == 1 and not A.data[reagentID][1].macro then | 130 if #(A.data[reagentID]) == 1 and not A.data[reagentID][1].macro then |
131 if A.data[reagentID][1].spellName ~= GetTradeSkillLine() then | |
132 A.Error(A.L["The recipe to make this reagent is in another tradeskill. Currently RagentMaker can not manage such a case, sorry."]) | |
133 return | |
134 end | |
135 | |
131 local numMakable, reagentIndex = A.numMakable(reagentID) | 136 local numMakable, reagentIndex = A.numMakable(reagentID) |
132 | 137 |
133 -- Try to show the recipe once if it was not found | 138 -- Try to show the recipe once if it was not found |
134 if not reagentIndex then | 139 if not reagentIndex then |
135 A.SaveActiveFilters(A.data[reagentID][1].header) | 140 A.SaveActiveFilters(A.data[reagentID][1].header) |
136 numMakable, reagentIndex = A.numMakable(reagentID) | 141 numMakable, reagentIndex = A.numMakable(reagentID) |
137 end | 142 end |
138 | 143 |
139 if not numMakable then | 144 if not numMakable then |
140 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."]) | 145 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."]) |
141 return | 146 return |
142 end | 147 end |
143 if numMakable>0 then | 148 if numMakable>0 then |
144 A.craft(recipeIndex,reagentRecipeIndex,reagentIndex,numMakable,chooseNumberToCraft) | 149 A.craft(recipeIndex,reagentRecipeIndex,reagentIndex,numMakable,chooseNumberToCraft) |