GetProfessions

From Warcraft Wiki
Jump to navigation Jump to search
Flavors
Links
Info
Added in 4.0.1

Returns the spell tab indices of the character's current professions.

prof1, prof2, archaeology, fishing, cooking = GetProfessions()

Returns

prof1
number - spell tab index for the first primary profession, or nil if not learned.
prof2
number - spell tab index for the second primary profession, or nil if not learned.
archaeology
number - spell tab index for Archaeology, or nil if not learned.
fishing
number - spell tab index for Fishing, or nil if not learned.
cooking
number - spell tab index for Cooking, or nil if not learned.

Details

  • The returned indices can be passed to GetProfessionInfo or GetSpellTabInfo functions.
  • Indices are not fixed and can change when a character learns or unlearns a profession.
  • WoW Icon update.png Classic uses GetNumPrimaryProfessions() instead.

Patch changes

Battle for Azeroth Patch 8.0.1 (2018-07-17): Removed firstAid return.
Cataclysm Patch 4.0.1 (2010-10-12): Added