C_TradeSkillUI.GetRecipeInfo

From Wowpedia
Jump to: navigation, search

Returns information for a recipe.

recipeInfo = C_TradeSkillUI.GetRecipeInfo(recipeSpellID [, recipeLevel])

Arguments

recipeSpellID 
number
recipeLevel 
number?

Returns

recipeInfo 
TradeSkillRecipeInfo?
Key Type Description
alternateVerb string? Alternate verb used for the recipe (such as enchants, or engineering tinkers)
categoryID number ID of the category the recipe belongs to.
craftable boolean Indicates if the recipe can be crafted.
difficulty string "trivial", "easy", "optimal", or "medium"
disabled boolean Indicates if the recipe is disabled.
favorite boolean Indicates if the recipe is marked as a favorite.
hiddenUnlessLearned boolean Indicates if the recipe should be hidden if it has yet to be learned.
icon number FileDataID
learned boolean Indicates if the character has learned the recipe.
name string Name of the recipe.
nextRecipeID number? ID of next recipe in the list.
numAvailable number The number that can be created with the available reagents.
numIndents number Number of indents when displaying under categories.
numSkillUps number The number of skillups from creating the recipe.
previousRecipeID number? ID of the previous recipe in the list.
productQuality number
recipeID number ID of the recipe.
sourceType number Source of the recipe.
type string Type of the recipe.

Example

The following snippet lists the names of all the recipes for the current trade skill:

for _, id in pairs(C_TradeSkillUI.GetAllRecipeIDs()) do
	local recipeInfo = C_TradeSkillUI.GetRecipeInfo(id)
	print(recipeInfo.recipeID, recipeInfo.name)
end

Patch changes

External links