WoW:API GetTrainerServiceSkillReq

From AddOn Studio
Revision as of 08:28, 8 July 2005 by WoWWiki>Dragonflyy
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Returns the name of the skill required, and the amount needed in that skill.

 skillName, skillAmt = GetTrainerServiceSkillReq(index);

Arguments

index
the number of the selection in the trainer window

Example

 local selection = GetTrainerSelectionIndex();
 
 local skillName, skillAmt = GetTrainerServiceSkillReq(selection);
 DEFAULT_CHAT_FRAME:AddMessage('Skill Line Required: ' .. skillName);
 DEFAULT_CHAT_FRAME:AddMessage('Skill Amount Required: ' .. skillAmt);

If you had the Alchemist trainer window open and Weak Troll's Blood Potion selected, the return on the chat window would be Alchemy and 15.

--Dragonflyy

--- Template:WoW API