WoW:API GetNumTalents: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
m ({{wowapi}})
Line 1: Line 1:
{{wowapi}}
Returns the total number of talents in a tab. '''Note:''' This includes learned and unlearned talents.
Returns the total number of talents in a tab. '''Note:''' This includes learned and unlearned talents.


  ''numTalents'' = GetNumTalents( ''tabIndex'' );
  numTalents = GetNumTalents(tabIndex);


----
----
Line 24: Line 25:


;''Results'' : Displays the number of talents for each tab followed by the name of the tab.
;''Results'' : Displays the number of talents for each tab followed by the name of the tab.
----
{{template:WoW API}}

Revision as of 08:20, 25 October 2006

WoW API < GetNumTalents

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.