WoW:API GetTradeSkillReagentInfo: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
({{wowapi}}, format, steal example from GetTradeSkillNumReagents.) |
||
| Line 1: | Line 1: | ||
{{wowapi}} __NOTOC__ | |||
Returns information on reagents for the specified trade skill. | Returns information on reagents for the specified trade skill. | ||
reagentName, reagentTexture, reagentCount, playerReagentCount = GetTradeSkillReagentInfo(tradeSkillRecipeId, reagentId); | |||
==Parameters== | |||
===Arguments=== | |||
:;tradeSkillRecipeId : The Id of the tradeskill recipe | :;tradeSkillRecipeId : The Id of the tradeskill recipe | ||
:;reagentId : The Id of the reagent (from 1 to x, where x is the result of calling [[API GetTradeSkillNumReagents|GetTradeSkillNumReagents]]) | :;reagentId : The Id of the reagent (from 1 to x, where x is the result of calling [[API GetTradeSkillNumReagents|GetTradeSkillNumReagents]]) | ||
===Returns=== | |||
:; reagentName : String - The name of the reagent. | |||
:; reagentTexture : String - The texture for the reagent's icon. | |||
:; reagentCount : Integer - The quantity of this reagent required to make one of these items. | |||
:; playerReagentCount : Integer - The quantity of this reagent in the player's inventory. | |||
==Example== | |||
local numReagents = GetTradeSkillNumReagents(id); | local numReagents = GetTradeSkillNumReagents(id); | ||
local totalReagents = 0; | |||
for i=1, numReagents, 1 do | for i=1, numReagents, 1 do | ||
local reagentName, reagentTexture, reagentCount, playerReagentCount = GetTradeSkillReagentInfo(id, i); | local reagentName, reagentTexture, reagentCount, playerReagentCount = GetTradeSkillReagentInfo(id, i); | ||
totalReagents = totalReagents + reagentCount; | |||
end; | end; | ||
===Result=== | |||
Calculates the total number of items required by the recipe. | |||
Revision as of 23:15, 23 December 2006
← WoW API < GetTradeSkillReagentInfo
Returns information on reagents for the specified trade skill.
reagentName, reagentTexture, reagentCount, playerReagentCount = GetTradeSkillReagentInfo(tradeSkillRecipeId, reagentId);
Parameters
Arguments
- tradeSkillRecipeId
- The Id of the tradeskill recipe
- reagentId
- The Id of the reagent (from 1 to x, where x is the result of calling GetTradeSkillNumReagents)
Returns
- reagentName
- String - The name of the reagent.
- reagentTexture
- String - The texture for the reagent's icon.
- reagentCount
- Integer - The quantity of this reagent required to make one of these items.
- playerReagentCount
- Integer - The quantity of this reagent in the player's inventory.
Example
local numReagents = GetTradeSkillNumReagents(id); local totalReagents = 0; for i=1, numReagents, 1 do local reagentName, reagentTexture, reagentCount, playerReagentCount = GetTradeSkillReagentInfo(id, i); totalReagents = totalReagents + reagentCount; end;
Result
Calculates the total number of items required by the recipe.