Wikia

WoWWiki

Watchlist Recent changes

API GetTradeSkillReagentInfo

Main Menue



Returns information on reagents for the specified trade skill.

reagentName, reagentTexture, reagentCount, playerReagentCount = GetTradeSkillReagentInfo(tradeSkillRecipeId, reagentId);

ParametersEdit

ArgumentsEdit

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)

ReturnsEdit

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.

ExampleEdit

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;

ResultEdit

Calculates the total number of items required by the recipe.

Pages on WoWWiki

95,750pages on
this wiki
Advertisement | Your ad here

Latest Photos

Add a Photo
58,025photos on this wiki
See more >

Recent Wiki Activity

See more >

Recent Questions

Around Wikia's network

Random Wiki