WoW:API GetProfessionInfo: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Created page with "{{wowapi}} __NOTOC__ <!-- Describe the purpose of the function, exhausting detail can be saved for a later section --> Gets details on a profession from its index including name,…")
 
m (Move page script moved page API GetProfessionInfo to WoW:API GetProfessionInfo without leaving a redirect)
 
(11 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{wowapi}} __NOTOC__
{{wowapi}} __NOTOC__
<!-- Describe the purpose of the function, exhausting detail can be saved for a later section -->
Gets details on a profession from its index including name, icon, and skill level.
Gets details on a profession from its index including name, icon, and skill level.
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
 
  name, icon, skillLevel, maxSkillLevel, return5, return6, return7= GetProfessionInfo(index)
  name, icon, skillLevel, maxSkillLevel, numAbilities, spelloffset,
    skillLine, skillModifier, specializationIndex,
    specializationOffset = GetProfessionInfo(index)


== Arguments ==
== Arguments ==
Line 10: Line 11:


== Returns ==
== Returns ==
:name, icon, skillLevel, maxSkillLEvel, return5, return6, return7<!-- Include this line ONLY IF there are multiple return values and a large number of arguments -->
:name, icon, skillLevel, maxSkillLevel, numAbilities, spelloffset, skillLine, skillModifier<!-- Include this line ONLY IF there are multiple return values and a large number of arguments -->
<!-- List each return value, together with its type -->
<!-- List each return value, together with its type -->
;name : String - The skill name
;name : String - The skill name (locale specific)
;icon : String - the location of the icon image
;icon : String - the location of the icon image
;skillLevel : Number - the current skill level
;skillLevel : Number - the current skill level
;maxSkillLevel : Number - the current skill cap (75 for apprentice, 150 for journeyman etc.)
;maxSkillLevel : Number - the current skill cap (75 for apprentice, 150 for journeyman etc.)
;return5 : Number - haven't figured this one out yet
;numAbilites : Number - The number of abilities/icons listed. These are the icons you put on your action bars.
;return6 : Number - haven't figured this one out yet
;spelloffset : Number - The offset id of the first Spell of this profession. (you can CastSpell(spelloffset + 1, "Spell") to use the first spell of this profession)
;return7 : Number - haven't figured this one out yet
;skillLine : Number - reference to the profession. (See Details.)
;skillModifier : Number - Additional modifiers to your profession levels. IE: Lures for Fishing.
;specializationIndex : Number - A value indicating which specialization is known (ie. Transmute specialist for Alchemist)
;specializationOffset : Number - haven't figured this one out yet


== Details ==
== Details ==
Line 24: Line 28:
     REMOVE the section if you're just going to restate the intro line! -->
     REMOVE the section if you're just going to restate the intro line! -->
This also seems to return some kind of data on the talent trees and guild perks.
This also seems to return some kind of data on the talent trees and guild perks.
Skill Line may be useful in internationalization using the number to check the profession rather than the text (which changes with localization).
The skill lines known are: Archaeology (794), Alchemy (171), Blacksmith (164), Cooking (184), Enchanting (333), Engineer (202), First Aid (129), Fishing (356), Herbalism (182), Inscription (773), Jewelcrafting (755), Leatherworking (165), Mining (186),  Skinning (393), and Tailoring (197).
Alchemy Specializations known are: Elixir (2), Potion (3), Transmute (4).

Latest revision as of 04:46, 15 August 2023

WoW API < GetProfessionInfo

Gets details on a profession from its index including name, icon, and skill level.

name, icon, skillLevel, maxSkillLevel, numAbilities, spelloffset,
    skillLine, skillModifier, specializationIndex,
    specializationOffset = GetProfessionInfo(index)

Arguments

index
Number - The skill index number (can be found with API GetProfessions()

Returns

name, icon, skillLevel, maxSkillLevel, numAbilities, spelloffset, skillLine, skillModifier
name
String - The skill name (locale specific)
icon
String - the location of the icon image
skillLevel
Number - the current skill level
maxSkillLevel
Number - the current skill cap (75 for apprentice, 150 for journeyman etc.)
numAbilites
Number - The number of abilities/icons listed. These are the icons you put on your action bars.
spelloffset
Number - The offset id of the first Spell of this profession. (you can CastSpell(spelloffset + 1, "Spell") to use the first spell of this profession)
skillLine
Number - reference to the profession. (See Details.)
skillModifier
Number - Additional modifiers to your profession levels. IE: Lures for Fishing.
specializationIndex
Number - A value indicating which specialization is known (ie. Transmute specialist for Alchemist)
specializationOffset
Number - haven't figured this one out yet

Details

This also seems to return some kind of data on the talent trees and guild perks.

Skill Line may be useful in internationalization using the number to check the profession rather than the text (which changes with localization).

The skill lines known are: Archaeology (794), Alchemy (171), Blacksmith (164), Cooking (184), Enchanting (333), Engineer (202), First Aid (129), Fishing (356), Herbalism (182), Inscription (773), Jewelcrafting (755), Leatherworking (165), Mining (186), Skinning (393), and Tailoring (197).

Alchemy Specializations known are: Elixir (2), Potion (3), Transmute (4).