API GetTradeSkillNumReagents

Returns the number of distinct reagents required by the specified recipe. numReagents = GetTradeSkillNumReagents(tradeSkillRecipeId);

Arguments

 * tradeSkillRecipeId : Integer - The id of the trade skill recipe.

Returns

 * reagentCount : Integer - The number of distinct reagents required to create the item.

Example
local numReagents = GetTradeSkillNumReagents(id); local totalReagents = 0; for i=1, numReagents, 1 do  local reagentName, reagentTexture, reagentCount, playerReagentCount = GetTradeSkillReagentInfo(id, i); totalReagents = totalReagents  reagentCount; end;

Result
Calculates the total number of items required by the recipe.