API GetTradeSkillInfo

100,545pages on
this wiki
Revision as of 00:23, October 25, 2010 by Toadicus (Talk | contribs)

(diff) ←Older revision | Latest revision (diff) | Newer revision → (diff)
WoW API < GetTradeSkillInfo

Synopsis Edit

Retrieves information about a specific trade skill.

skillName, skillType, numAvailable, isExpanded, altVerb, numSkillUps = GetTradeSkillInfo(skillIndex)

Arguments Edit

Number - The id of the skill you want to query.

Returns Edit

skillName, skillType, numAvailable, isExpanded, altVerb, numSkillUps
String - The name of the skill, e.g. "Copper Breastplate" or "Daggers", if the skillIndex references to a heading.
String - Either "header", if the skillIndex references to a heading, or a string indicating the difficulty to craft the item ("trivial", "easy", "medium", "optimal", "difficult").
Number - The number of items the player can craft with his available trade goods.
Boolean - Returns if the header of the skillIndex is expanded in the crafting window or not
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."
Number - The number of skill ups that the player can receive by crafting this item.

Example Edit

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

Result Edit

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

Details Edit

Retrieves the name of the skill, the type of the skill and the amount the player can craft for a specific crafting skill.
Advertisement | Your ad here

Around Wikia's network

Random Wiki