WoW:API GetTalentInfo

Revision as of 17:47, 19 March 2005 by WoWWiki>JoseJr
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Returns the name of a specified talent in a specified tab.

nameTalent = GetTalentInfo( tabIndex , talentIndex );

Arguments
tabIndex
Integer - Specifies which tab the talent is in.
talentIndex
Integer - Specifies which talent to return its name.

Note: The talentIndex is counted as if it where a tree meaning that the left most talent in the top most row is number 1 followed by the one immediate to the right is number 2, if there is no more talents to the right then it continues from the left most talent on the next row.


Returns
nameTalent
String - The name of the talent in that tab.

Example
local i = 1 
while i <= GetNumTalentTabs() do 
	local numTalents = GetNumTalents(i) 
       local t = 1
       DEFAULT_CHAT_FRAME:AddMessage(GetTabInfo(i))
       while t <= numTalents do 
           DEFAULT_CHAT_FRAME:AddMessage(  t .. ' ' .. GetTalentInfo(i,t) .. ' ' )
       end
       i = i+1
end
Results
Displays the tab name then the talentIndex number followed by the talents name for each talent in each tab.

Template:WoW API