Quantcast
WoWInterface - View Single Post - Professions API for BFA and the expansion-specific skills?
View Single Post
08-12-18, 04:11 PM   #2
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,703
You need to query each category using C_TradeSkillUI.GetCategoryInfo(categoryID).
This returns a table populated with the name of the category, "skillLineCurrentLevel" and "skillLineMaxLevel" for cur/max.
(sidenote: skillLine == profession)

Here's a full list of possible category IDs: https://github.com/p3lim-wow/LibProc....lua#L509-L620

To get the category data the profession data must be loaded, which you can do by registering the "TRADE_SKILL_SHOW" event and calling C_TradeSkillUI.OpenTradeSkill(professionID).
Profession IDs can be found in the same list as above.

The downside of this is that you actually have to open the profession to get the information, which can trigger a boatload of issues for you when users of your addon uses other addons who also do something when the data is loaded or the profession UI is shown.

I've petitioned Blizzard for an alternate way of retrieving the data without opening the profession completely, but the response was "unlikely".

Last edited by p3lim : 08-12-18 at 04:38 PM.
  Reply With Quote