WoW:API GetNumTalents

From AddOn Studio
Revision as of 17:29, 19 March 2005 by WoWWiki>JoseJr
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Returns the total number of talents in a tab. Note: This includes learned and unlearned talents.

numTalents = GetNumTalents( tabIndex );

Arguments
tabIndex
Integer - Specifies which tab to count the total number of talent points.

Returns
numTalents
Integer - The number of talents in that tab.

Example
local i = 1 
while i <= GetNumTalentTabs() do 
	local numTalents = GetNumTalents(i) 
       DEFAULT_CHAT_FRAME:AddMessage( numTalents .. ' ' .. GetTalentTabInfo(i) .. ' ' )
       i = i+1
end
Results
Displays the number of talents for each tab followed by the name of the tab.

Template:WoW API