comparison Craft.lua @ 119:3854c682bb4a

Cosmetic
author contrebasse
date Sun, 19 Jun 2011 20:29:07 +0200
parents af23986010ef
children
comparison
equal deleted inserted replaced
118:c32d6bf6cfc1 119:3854c682bb4a
53 A.CraftItemWithRecipe(recipeIndex,reagentID,A.data[reagentID][1],reagentIndexInRecipe,chooseNumberToCraft,btn) 53 A.CraftItemWithRecipe(recipeIndex,reagentID,A.data[reagentID][1],reagentIndexInRecipe,chooseNumberToCraft,btn)
54 54
55 else -- Many recipes are known for this item, or it is not a standard tradeskill display them all 55 else -- Many recipes are known for this item, or it is not a standard tradeskill display them all
56 A.externalCraftWindow(reagentID,reagentIndexInRecipe) 56 A.externalCraftWindow(reagentID,reagentIndexInRecipe)
57 end -- if 57 end -- if
58 --A.RestoreActiveFilters()
59 end -- function 58 end -- function
60 59
61 -- Launch the procedure for a standard recipe 60 -- Launch the procedure for a standard recipe
62 -- Can be called from the external window 61 -- Can be called from the external window
63 function A.CraftItemWithRecipe(recipeIndex,reagentID,recipeData,reagentIndexInRecipe,chooseNumberToCraft,btn) 62 function A.CraftItemWithRecipe(recipeIndex,reagentID,recipeData,reagentIndexInRecipe,chooseNumberToCraft,btn)
148 function A.DoCraft(reagentID,recipeData,numToMake) 147 function A.DoCraft(reagentID,recipeData,numToMake)
149 -- Remove filters 148 -- Remove filters
150 A.SaveActiveFilters(recipeData.header) 149 A.SaveActiveFilters(recipeData.header)
151 150
152 -- Find recipe index 151 -- Find recipe index
153 local reagentIndex = A.findExactSkillIndex(reagentID,recipeData.spellLink) -- finds only the first recipe that creates the reagent, should check recipe name too 152 local reagentIndex = A.findExactSkillIndex(reagentID,recipeData.spellLink)
154 153
155 -- Error if not found 154 -- Error if not found
156 if not reagentIndex then 155 if not reagentIndex then
157 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."]) 156 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."])
158 A.RestoreActiveFilters() 157 A.RestoreActiveFilters()