Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
Advertisement

Retrieves information about a specific trade skill.

skillName, skillType, numAvailable, isExpanded, altVerb, numSkillUps, indentLevel, showProgressBar, currentRank, maxRank, startingRank = GetTradeSkillInfo(skillIndex)

Arguments[]

(skillIndex)
skillIndex
number - The id of the skill you want to query.

Returns[]

skillName, skillType, numAvailable, isExpanded, altVerb, numSkillUps
skillName
string - The name of the skill, e.g. "Copper Breastplate" or "Daggers", if the skillIndex references to a heading.
skillType
string - "header", if the skillIndex references to a heading; "subheader", if the skillINdex references a subheader for things like the cooking specialties; or a string indicating the difficulty to craft the item ("trivial", "easy", "medium", "optimal", "difficult").
numAvailable
number - The number of items the player can craft with his available trade goods.
isExpanded
boolean - Returns if the header of the skillIndex is expanded in the crafting window or not
altVerb
string - If not nil, a verb other than "Create" which describes the trade skill action (i.e., for Enchanting, this returns "Enchant"). If nil the expected verb is "Create."
numSkillUps
number - The number of skill ups that the player can receive by crafting this item.
indentLevel
number - 0 or 1, indicates whether this skill should be indented beneath its header. Used for specialty subheaders and their recipes.
showProgressBar
boolean - indicates if a sub-progressbar must be displayed with the specialty current and max ranks. In the normal UI, those values are only shown when the mouse is over the sub-header.
currentRank
number - is a the current rank for the specialty if showProgressBar is true.
maxRank
number - is a the maximum rank for the specialty if showProgressBar is true.
startingRank
number - is the starting rank where the specialty is available. It is used as the starting value of the progress bar.

Example[]

local name, type;
for i=1,GetNumTradeSkills() do
   name, type, _, _, _, _ = GetTradeSkillInfo(i);
   if (name and type ~= "header") then
      DEFAULT_CHAT_FRAME:AddMessage("Found: "..name);
   end
end

Result[]

Displays all items the player is able to craft in the chat windows.

Patch changes[]

Mists of Pandaria Patch 5.0.4 (2012-08-28): Added "subheader" skillType and return values indentLevel, showProgressBar, currentRank, maxRank, and startingRank.

Advertisement