Hello there! We are conducting a survey to better understand the user experience in making a first edit. If you have ever made an edit on Gamepedia, please fill out the survey. Thank you!
Returns the number of distinct reagents needed for the specified recipe.
numReagents = C_TradeSkillUI.GetRecipeNumReagents(recipeID)
- Number - ID of the recipe to get the number of distinct reagents for.
- Number - The number of distint reagents needed for the specified recipe.
The following snippet counts the total number of reagents needed for a recipe:
local numReagents = C_TradeSkillUI.GetRecipeNumReagents(recipeID); local totalReagents = 0; for idx = 1, numReagents do local _, _, reagentCount, _ = C_TradeSkillUI.GetRecipeReagentInfo(recipeID, idx); totalReagents = totalReagents + reagentCount; end;