API:GetItemType

Gets type id and type name of ingredient for learned craft recipe.

typeid, typename = GetItemType(RecipeGUID, ingredient)

Arguments

 * RecipeGUID
 * number - recipe id
 * ingredient
 * number - next ingredient number (from 1 to GetCraftRequestItem(RecipeGUID, -1))

Returns

 * typeid
 * number - type id
 * typename
 * string - type name (eg. Rune, Ore)

Example
local numSkills = GetCraftItemList if numSkills == 0 then return end

local numSubTypes = GetCraftSubType(1, -1) if numSubTypes == 0 then return end

local numItem = GetCraftItem( 1, 1, -1 ) if numItem == 0 then return end

local _, name, icon, RecipeGUID = GetCraftItem(1, 1, 1)

local typeid, typename = GetItemType(RecipeGUID, 1)