C_TradeSkillUI .GetRecipeNumReagents
Jump to navigation
Jump to search
C_TradeSkillUI.GetRecipeSchematic |
+ 10.0.0 | ||
C_TradeSkillUI.GetRecipeNumReagents |
+ 7.0.3 | ||
GetTradeSkillNumReagents |
+ 1.0.0 / 1.13.2 |
Returns the number of distinct reagents needed for the specified recipe.
numReagents = C_TradeSkillUI.GetRecipeNumReagents(recipeSpellID [, recipeLevel])
Arguments
- recipeSpellID
- number
- recipeLevel
- number?
Returns
- numReagents
- number - The number of distinct reagents needed for the specified recipe.
Example
Prints the reagents for [Thorium Widget]. The player has 12 Thorium Bars and zero Runecloth.
local recipeId = 19791 -- Thorium Widget
for i = 1, C_TradeSkillUI.GetRecipeNumReagents(recipeId) do
print(C_TradeSkillUI.GetRecipeReagentInfo(recipeId, i))
end
-- "Thorium Bar", 133221, 3, 12
-- "Runecloth", 132903, 1,
Patch changes
Patch 10.0.0 (2022-10-25): Removed.
Patch 7.0.3 (2016-07-19): Added. Replaces GetTradeSkillNumReagents()