Mercurial > wow > reagentmaker
comparison ReagentMaker.lua @ 93:c369a2e16ab6
Added prospecting and common data
author | contrebasse |
---|---|
date | Thu, 19 May 2011 20:25:41 +0200 |
parents | 6a91e19275c8 |
children | b980c00affcd |
comparison
equal
deleted
inserted
replaced
92:c1214d48fa1c | 93:c369a2e16ab6 |
---|---|
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 | 131 if A.data[reagentID][1].spellName and A.data[reagentID][1].spellName ~= GetTradeSkillLine() then |
132 A.Error(A.L["The recipe to make this reagent is in another tradeskill. Currently ReagentMaker can not manage such a case, sorry."]) | 132 A.Error(A.L["The recipe to make this reagent is in another tradeskill. Currently ReagentMaker can not manage such a case, sorry."]) |
133 return | 133 return |
134 end | 134 end |
135 | 135 |
136 local numMakable, reagentIndex = A.numMakable(reagentID) | 136 local numMakable, reagentIndex = A.numMakable(reagentID) |
137 | 137 |
138 -- Try to show the recipe once if it was not found | 138 -- Try to show the recipe by removing filters once if it was not found |
139 if not reagentIndex then | 139 if not reagentIndex then |
140 A.SaveActiveFilters(A.data[reagentID][1].header) | 140 A.SaveActiveFilters(A.data[reagentID][1].header) |
141 numMakable, reagentIndex = A.numMakable(reagentID) | 141 numMakable, reagentIndex = A.numMakable(reagentID) |
142 end | 142 end |
143 | 143 |
150 return | 150 return |
151 end | 151 end |
152 | 152 |
153 -- If we can make the item needed to make the reagent, open a window to make it | 153 -- If we can make the item needed to make the reagent, open a window to make it |
154 -- one step recursion, enables to mill to create an ink | 154 -- one step recursion, enables to mill to create an ink |
155 if (not A.data[reagentID][1].manyReagents) and A.data[A.data[reagentID][1][1]] then | 155 if A.data[reagentID][1][1] and A.data[A.data[reagentID][1][1]] then |
156 if A.externalCraftWindow(A.data[reagentID][1][1],reagentID) ~= false then | 156 if A.externalCraftWindow(A.data[reagentID][1][1],reagentID) ~= false then |
157 return | 157 return |
158 end | 158 end |
159 end | 159 end |
160 | 160 |