Navigation menu

WoW:API GetTradeSkillInfo: Difference between revisions

Jump to navigation Jump to search
m
Move page script moved page API GetTradeSkillInfo to WoW:API GetTradeSkillInfo without leaving a redirect
m (fix error when name is nil in code example)
m (Move page script moved page API GetTradeSkillInfo to WoW:API GetTradeSkillInfo without leaving a redirect)
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{wowapi}}
{{wowapi}}
<center>'''GetTradeSkillInfo''' - ''Documentation edited by wowpendium.de''</center>


== Synopsis ==
== Synopsis ==
Retrieves information about a specific trade skill.
Retrieves information about a specific trade skill.


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


== Arguments ==
== Arguments ==
:(skillIndex)
(skillIndex)


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


== Returns ==
== Returns ==
:skillName, skillType, numAvailable, isExpanded
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.
:;skillName : String - The name of the skill, e.g. "Copper Breastplate" or "Daggers", if the skillIndex references to a heading.
Line 19: Line 18:
:;numAvailable : Number - The number of items the player can craft with his available trade goods.
:;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
:;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.


== Example ==
== Example ==
<!-- begin code -->
<!-- begin code -->
local tradeSkillsNum;
  local name, type;
  local name, type;
  for i=1,GetNumTradeSkills() do
  for i=1,GetNumTradeSkills() do
     name, type, _, _ = GetTradeSkillInfo(i);
     name, type, _, _, _, _ = GetTradeSkillInfo(i);
     if (name and type ~= "header") then
     if (name and type ~= "header") then
       DEFAULT_CHAT_FRAME:AddMessage("Found: "..name);
       DEFAULT_CHAT_FRAME:AddMessage("Found: "..name);
Anonymous user