WoW:API GetNumTalents: Difference between revisions

m
Move page script moved page API GetNumTalents to WoW:API GetNumTalents without leaving a redirect
No edit summary
m (Move page script moved page API GetNumTalents to WoW:API GetNumTalents without leaving a redirect)
 
(5 intermediate revisions by 5 users not shown)
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'' );
  local numTalents = GetNumTalents(tabIndex);


----
----
Line 13: Line 14:
:;numTalents : Integer - The number of talents in that tab.
:;numTalents : Integer - The number of talents in that tab.


----
== Patch changes ==
;''Example''
{{Patch 5.0.4|note=Returns 18}}.
 
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}}
Anonymous user