Quantcast
WoWInterface - View Single Post - Getting required profession levels for Recipes/Patterns/Plans/Schematics etc.?
View Single Post
10-19-18, 05:19 PM   #20
jeruku
A Cobalt Mageweaver
 
jeruku's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 218
Originally Posted by Nimhfree View Post
You can try from Blizzard_TradeSkillUI.lua:
Code:
			--[[ Parent categories ]]--
			local categories = { C_TradeSkillUI.GetCategories() };

			for i, categoryID in ipairs(categories) do
				local categoryData = C_TradeSkillUI.GetCategoryInfo(categoryID);
				info.text = categoryData.name;
The name is localized. However, it appears with my brief testing that you need to have opened the Blizzard panel up first before C_TradeSkillUI API actually returns non nil.
For posterity.
The Blizzard TradeSkillUI addon is loaded on demand so you can either open the trade skill frame or simply load the addon. Best time to load the addon is when your addon is loaded.

Lua Code:
  1. local loaded, reason = LoadAddOn("Blizzard Trade Skill UI")
  2.    --If that does not work then perhaps try replacing "Blizzard Trade Skill UI" with "Blizzard_TradeSkillUI", it's been a while after all
__________________
"I have not failed, I simply found 10,000 ways that did not work." - Thomas Edison
  Reply With Quote