API C_TradeSkillUI.GetCategories

From Wowpedia
Jump to: navigation, search

Returns a value containing the number of Category IDs for trade skills

numCategories = C_TradeSkillUI.GetCategories()

Returns

numCategories
value - The number of categories available

Example

The following snippet lists the names of all the Categories:

local numCategories = C_TradeSkillUI.GetCategories();
local catInfo = {};
for idx = 1, numCategories do
  C_TradeSkillUI.GetCategoryInfo(idx, catInfo);
  print(idx, catInfo.name);
end

Details

  • The table that is returned includes Category info.
  • Some Categories are empty.

See also