WoWInterface - View Single Post - Getting required profession levels for Recipes/Patterns/Plans/Schematics etc.?
View Single Post
10-11-18, 05:24 PM   #12
A Cobalt Mageweaver
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 248
Originally Posted by Nimhfree View Post
I have not converted Grail to using the new profession system, but in general you get the professions the user has with:
local prof1, prof2, archaeology, fishing, cooking, firstAid = GetProfessions()
And then you can call:
where the professionId is each of the items returned from the first call. Historically it was good enough to use the first return value (the profession name), and the third return value (the profession skill level). However, now that skill level is only within the specific expansion value. I believe the fourth return value is the maximum skill in that expansion value, so third and fourth values of 13 and 150 would mean you have skill 13/150 in the specific expansion. However, I do not know what value tells me the expansion yet.

Apparently, GetProfessionInfo() only gives you the values for the one skill bar, WoW deems appropriate for your character level. So when I am a lvl 100 demon hunter that has just learned cooking, GetProfessionInfo() will only give me the values of my "Legion Cooking" skill bar. :-(

Any idea how I can access the values for the other skill bars?

But for my addon I only need to know if my character's skill level is high enough to learn a recipe. I don't care how far I am from reaching it. So I am thinking about simply using GetTextColor() in the tooltip scan. If the "Requires ... Cooking (...)" line is red, I know that my character cannot learn the recipe yet. A little cumbersome, but this would do the trick I guess.
  Reply With Quote