Mercurial > wow > reagentmaker
comparison data.lua @ 66:2ca04183f5f9
Correct number of Tin Ore needed for Shadowgem
author | contrebasse |
---|---|
date | Sat, 14 May 2011 10:05:56 +0200 |
parents | 4d0ec5b598d0 |
children | cd7e41015586 |
comparison
equal
deleted
inserted
replaced
65:60871b43531d | 66:2ca04183f5f9 |
---|---|
175 spellLink = ProspectLink, | 175 spellLink = ProspectLink, |
176 {2770,5,0.5}}, -- Copper Ore | 176 {2770,5,0.5}}, -- Copper Ore |
177 [1210] = { -- Shadowgem | 177 [1210] = { -- Shadowgem |
178 spell = macroProspect, | 178 spell = macroProspect, |
179 spellLink = ProspectLink, | 179 spellLink = ProspectLink, |
180 {2771,50,0.38}, -- Tin Ore | 180 {2771,5,0.38}, -- Tin Ore |
181 {2770,5,0.1}}, -- Copper Ore | 181 {2770,5,0.1}}, -- Copper Ore |
182 [1705] = { -- Lesser Moonstone | 182 [1705] = { -- Lesser Moonstone |
183 spell = macroProspect, | 183 spell = macroProspect, |
184 spellLink = ProspectLink, | 184 spellLink = ProspectLink, |
185 {2771,5,0.38}, -- Tin Ore | 185 {2771,5,0.38}, -- Tin Ore |
267 -- Has to have recipes and begin with a header | 267 -- Has to have recipes and begin with a header |
268 local NRecipes = GetNumTradeSkills() | 268 local NRecipes = GetNumTradeSkills() |
269 if NRecipes==0 or select(2,GetTradeSkillInfo(1))~="header" then | 269 if NRecipes==0 or select(2,GetTradeSkillInfo(1))~="header" then |
270 return | 270 return |
271 end | 271 end |
272 | 272 |
273 for i = 2,NRecipes do -- The first one is a header | 273 for i = 2,NRecipes do -- The first one is a header |
274 local skillName, skillType, numAvailable, isExpanded, serviceType, numSkillUps = GetTradeSkillInfo(i) | 274 local skillName, skillType, numAvailable, isExpanded, serviceType, numSkillUps = GetTradeSkillInfo(i) |
275 if skillType ~= "header" then | 275 if skillType ~= "header" then |
276 --if GetTradeSkillNumReagents(i) == 1 then | 276 --if GetTradeSkillNumReagents(i) == 1 then |
277 -- item ID | 277 -- item ID |
283 -- reagent number needed | 283 -- reagent number needed |
284 local reagentName, reagentTexture, reagentCount, playerReagentCount = GetTradeSkillReagentInfo(i, 1) | 284 local reagentName, reagentTexture, reagentCount, playerReagentCount = GetTradeSkillReagentInfo(i, 1) |
285 | 285 |
286 -- number of reagent created by the recipe | 286 -- number of reagent created by the recipe |
287 local minMade, maxMade = GetTradeSkillNumMade(i) | 287 local minMade, maxMade = GetTradeSkillNumMade(i) |
288 | 288 |
289 -- recipe link (for tooltips) | 289 -- recipe link (for tooltips) |
290 local recipeLink = GetTradeSkillRecipeLink(i) | 290 local recipeLink = GetTradeSkillRecipeLink(i) |
291 | 291 |
292 -- error checking | 292 -- error checking |
293 if not reagentID or not reagentCount or not skillName or not itemID or not minMade or not maxMade or not recipeLink then | 293 if not reagentID or not reagentCount or not skillName or not itemID or not minMade or not maxMade or not recipeLink then |
294 --@debug@ | 294 --@debug@ |
295 print("Erreur de scan :",itemID,skillName,reagentID,reagentCount,minMade,maxMade,recipeLink) | 295 print("Erreur de scan :",itemID,skillName,reagentID,reagentCount,minMade,maxMade,recipeLink) |
296 --@end-debug@ | 296 --@end-debug@ |
297 | 297 |
298 else -- Zap incomplete recipes, they will be scanned later | 298 else -- Zap incomplete recipes, they will be scanned later |
299 -- remove unneeded minMade/maxMade | 299 -- remove unneeded minMade/maxMade |
300 if maxMade==minMade then | 300 if maxMade==minMade then |
301 maxMade = nil | 301 maxMade = nil |
302 if minMade==1 then | 302 if minMade==1 then |
323 end -- if | 323 end -- if |
324 end -- if | 324 end -- if |
325 --end -- if | 325 --end -- if |
326 end -- if | 326 end -- if |
327 end -- for | 327 end -- for |
328 | 328 |
329 -- the scanning is complete | 329 -- the scanning is complete |
330 return true | 330 return true |
331 end -- function | 331 end -- function |
332 end -- do | 332 end -- do |