WoW:API GetTradeSkillNumReagents: Difference between revisions

m
no edit summary
No edit summary
 
mNo edit summary
Line 3: Line 3:
Returns the number of different reagents required by the specified recipe. Thus, if a recipe calls for 2 copper tubes, 1 malachite and 2 blasting powders, GetTradeSkillNumReagents would return 3. If it required 5 linen cloths, the result would be 1.
Returns the number of different reagents required by the specified recipe. Thus, if a recipe calls for 2 copper tubes, 1 malachite and 2 blasting powders, GetTradeSkillNumReagents would return 3. If it required 5 linen cloths, the result would be 1.


Once you know how many different reagents you need, you can use [[API GetTradeSkillReagentInfo]] to find out how many of each one are required.
Once you know how many different reagents you need, you can use [[API GetTradeSkillReagentInfo|GetTradeSkillReagentInfo]] to find out how many of each one are required.


  local numReagents = GetTradeSkillNumReagents(tradeSkillRecipeId);
  local numReagents = GetTradeSkillNumReagents(tradeSkillRecipeId);
Anonymous user