Professions API for BFA and the expansion-specific skills?
I'm trying to find out the skill levels for each expansion's profession (Legion Cooking etc.). Before 8.0.1, I simply used GetProfessions() and then GetProfessionInfo(), which would provide me with the desired data. Now, it merely tells me that I have 100/100 in Legion Cooking (or whatever is the highest skill being displayed in the UI), but there's no info whatsoever about the other ones. This doesn't help me very much, unfortunately.
Is there a simple way to do this? I've searched these forums, Google, and FrameXML/Blizzard's UI but I didn't find so much as a hint. I noticed that I could detect the individual expansion-specific spells by ID, but that doesn't help in finding the exact skill level they're at.
Thanks for your time!
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".
|All times are GMT -6. The time now is 02:28 AM.|
vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI