Quantcast Classic profession skill levels? - WoWInterface
Thread Tools Display Modes
09-27-19, 08:58 PM   #1
jshipley
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Sep 2019
Posts: 4
Classic profession skill levels?

I'm trying to figure out the best way to find out what my current skill level is for First Aid.

From what I can find, GetProfessions / GetProfessionInfo don't work in Classic, and I'm stuck trying to use GetSkillLineInfo. The problem is that I'm not sure I can rely on this. I'm currently using index 10, because that's what First Aid is for me, right now. I could loop over GetSkillLineInfo using GetNumSkillLines, but then I would have to rely on using the "First Aid" string to identify the right skill line and I don't think that would work in any language other than English.

Is there a better way to get the current First Aid skill in Classic?
  Reply With Quote
09-27-19, 11:16 PM   #2
Kanegasi
A Scalebane Royal Guard
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 409
Loop through those indexes while comparing the skillname argument with the available global strings, which are locally translated depending on the installed client.

CHARACTER_PROFESSION_ALCHEMY = "Alchemy"
CHARACTER_PROFESSION_BLACKSMITHING = "Blacksmithing"
CHARACTER_PROFESSION_ENCHANTING = "Enchanting"
CHARACTER_PROFESSION_ENGINEERING = "Engineering"
CHARACTER_PROFESSION_FIRST_AID = "First Aid"
CHARACTER_PROFESSION_HERBALISM = "Herbalism"
CHARACTER_PROFESSION_LEATHERWORKING = "Leatherworking"
CHARACTER_PROFESSION_MINING = "Mining"
CHARACTER_PROFESSION_SKINNING = "Skinning"
CHARACTER_PROFESSION_TAILORING = "Tailoring"

I'm sure you already have the 4th argument, which is the skill level, but make sure to add it to the 5th argument, which is any temp points, like fishing has with poles and bobbers. I don't know if First Aid has any temp buffs or items but better safe than sorry.
  Reply With Quote
09-28-19, 01:02 AM   #3
jshipley
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Sep 2019
Posts: 4
Thank you. Those global strings are exactly what I need.
  Reply With Quote
09-28-19, 03:21 AM   #4
fyehu43
A Deviate Faerie Dragon
Join Date: Sep 2019
Posts: 12
Originally Posted by Kanegasi View Post
Loop through those indexes while comparing the skillname argument with the available global strings, which are locally translated depending on the installed client.

CHARACTER_PROFESSION_ALCHEMY = "Alchemy"
CHARACTER_PROFESSION_BLACKSMITHING = "Blacksmithing"
CHARACTER_PROFESSION_ENCHANTING = "Enchanting"
CHARACTER_PROFESSION_ENGINEERING = "Engineering"
CHARACTER_PROFESSION_FIRST_AID = "First Aid"
CHARACTER_PROFESSION_HERBALISM = "Herbalism"
CHARACTER_PROFESSION_LEATHERWORKING = "Leatherworking"
CHARACTER_PROFESSION_MINING = "Mining"
CHARACTER_PROFESSION_SKINNING = "Skinning"
CHARACTER_PROFESSION_TAILORING = "Tailoring"

I'm sure you already have the 4th argument, which is the skill level, but make sure to add it to the 5th argument, which is any temp points, like fishing has with poles and bobbers. I don't know if First Aid has any temp buffs or items but better safe than sorry.
ohh neat I legitimately didn't know about this, thanks!
__________________
Shaman Raid Tank & expert in off-meta specs: Melee Hunter, Support Warrior, Priest Tank, etc...
  Reply With Quote
09-28-19, 09:33 AM   #5
Kanegasi
A Scalebane Royal Guard
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 409
Unfortunately, GlobalStrings have not been included in the FrameXML dump for years, so it's understandable that some people miss it. However, there are sites that extract things from the game files:

https://wow.tools/dbc/?dbc=globalstr...search=&page=1
  Reply With Quote
09-28-19, 11:58 AM   #6
Nimhfree
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 260
I just tried in Classic and it appears CHARACTER_PROFESSION_ENCHANTING, etc. are all nil.
  Reply With Quote
09-28-19, 01:59 PM   #7
Kanegasi
A Scalebane Royal Guard
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 409
Weird, then that means the wow.tools dump is wrong or somehow dumped retail instead. Searching the strings directly ingame for "PROFESSIONS" got me these:

Lua Code:
  1. --LE_FRAME_TUTORIAL_PROFESSIONS=5,
  2. --PROFESSIONS_ARCHAEOLOGY="Archaeology",
  3. --PROFESSIONS_ARCHAEOLOGY_MISSING="Visit a trainer to learn archaeology.  Archaeology allows you to discover valuable treasures and learn ancient lore of the world.",
  4. PROFESSIONS_COOKING="Cooking",
  5. --PROFESSIONS_COOKING_MISSING="Visit a trainer to learn cooking. Cooking lets you learn recipes to create food that heals you out of combat and grants you temporary buffs."
  6. PROFESSIONS_FIRST_AID="First Aid",
  7. --PROFESSIONS_FIRST_AID_MISSING="Visit a trainer to learn first aid.  First aid lets you turn cloth into bandages for healing yourself and others.",
  8. --PROFESSIONS_FIRST_PROFESSION="First Profession",
  9. PROFESSIONS_FISHING="Fishing",
  10. --PROFESSIONS_FISHING_MISSING="Visit a trainer to learn fishing.  Fishing lets you catch fish and other strange things from water.  Fish can be cooked into delicious meals with the Cooking skill.",
  11. --PROFESSIONS_HELP_1="You can find trainers for professions in a major city.\n\nA gathering profession is recommended for new players.",
  12. --PROFESSIONS_HELP_2="You can find trainers for professions in a major city.\n\nFirst Aid is recommended for new players.",
  13. --PROFESSIONS_MISSING_PROFESSION="Visit a profession trainer in a major city to learn a new profession. You may have two professions. You may have any combination of gathering and production professions.",
  14. --PROFESSIONS_SECOND_PROFESSION="Second Profession",
  15. --PROFESSIONS_USED_IN_COOKING="Crafting Reagent",

Looks like there's no global strings at all for the other tradeskills or crafts. It's also possible that the global string dump is correct and this is a case of purposeful coding to emulate vanilla.

Last edited by Kanegasi : 09-28-19 at 02:03 PM.
  Reply With Quote
09-28-19, 03:25 PM   #8
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,667
Check the extracted code (you can even extract it yourself) to see how the default UI does it in the skills window.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
09-28-19, 03:32 PM   #9
Kanegasi
A Scalebane Royal Guard
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 409
I looked at that before answering originally. The code to set up the SkillFrame tab is just a mindless index loop with headers injected into the data like the ReputationFrame.

local skillName, header, isExpanded, skillRank, numTempPoints, skillModifier, skillMaxRank, isAbandonable, stepCost, rankCost, minLevel, skillCostType, skillDescription = GetSkillLineInfo(skillIndex)

It's easy to get info on a single profession in retail, you have to loop through this function in classic.
  Reply With Quote
09-28-19, 08:02 PM   #10
Nimhfree
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 260
Retail also does not have those strings. I wish both had them as it would make my life easier. The interesting thing is the website with the dump has a field with value 1 which appears to be in use by Blizzard clients. However, those strings with the profession names have a 2 in that field instead.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Classic profession skill levels?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off