WoW:API GetTradeSkillInfo: Difference between revisions
Jump to navigation
Jump to search
GetTradeSkillInfo -Documentation edited by wowpendium.de-
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
skillName, skillType, numAvailable, isExpanded = GetTradeSkillInfo(skillIndex); | <center>'''GetTradeSkillInfo''' ''-Documentation edited by wowpendium.de-''</center> | ||
Retrieves the name of the skill, the type of the skill and the amount the player can craft for a specific crafting skill. | |||
skillName, skillType, numAvailable, isExpanded = GetTradeSkillInfo(skillIndex); | |||
---- | |||
;''Arguments'' | |||
:(Number skillIndex) | |||
:;skillIndex : The id of the skill you want to query. | |||
---- | |||
;''Returns'' | |||
:;skillName : (string) The name of the skill, e.g. "Copper Breastplate" or "Daggers", if the skillIndex references to a heading. | |||
:;skillType : (string) Either "header", if the skillIndex references to a heading, or a string indicating the difficulty to craft the item ("trivial", "easy" (?), "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 | |||
---- | |||
;''Example'' | |||
local tradeSkillsNum; | |||
local name, type; | |||
for i=1,GetNumTradeSkills() do | |||
name, type, _, _ = GetTradeSkillInfo(i); | |||
if (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. | |||
---- | |||
;''Description'' | |||
: Retrieves information about a specific trade skill. | |||
---- | |||
{{Template:WoW API}} | |||
Revision as of 09:06, 7 March 2005
Retrieves the name of the skill, the type of the skill and the amount the player can craft for a specific crafting skill.
skillName, skillType, numAvailable, isExpanded = GetTradeSkillInfo(skillIndex);
- Arguments
- (Number skillIndex)
- skillIndex
- The id of the skill you want to query.
- Returns
- skillName
- (string) The name of the skill, e.g. "Copper Breastplate" or "Daggers", if the skillIndex references to a heading.
- skillType
- (string) Either "header", if the skillIndex references to a heading, or a string indicating the difficulty to craft the item ("trivial", "easy" (?), "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
- Example
local tradeSkillsNum;
local name, type;
for i=1,GetNumTradeSkills() do
name, type, _, _ = GetTradeSkillInfo(i);
if (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.
- Description
- Retrieves information about a specific trade skill.