WoW:API GetTalentTabInfo: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(upgraded deprecated template)
(Add 2.3 inspect option.)
Line 2: Line 2:
Returns the information of the talent tab (tree)
Returns the information of the talent tab (tree)


  ''name, iconTexture, pointsSpent, background'' = GetTalentTabInfo( ''tabIndex'' );
  ''name, iconTexture, pointsSpent, background'' = GetTalentTabInfo( ''tabIndex'' [,''inspect''] );


----
----
Line 8: Line 8:


:;tabIndex : Integer - Specifies which tab (tree) to identify.
:;tabIndex : Integer - Specifies which tab (tree) to identify.
:;inspect : [[Boolean]] - If true returns the information for the inspected unit instead of  the player. New with 2.3.


----
----

Revision as of 19:53, 12 October 2007

WoW API < GetTalentTabInfo

Returns the information of the talent tab (tree)

name, iconTexture, pointsSpent, background = GetTalentTabInfo( tabIndex [,inspect] );

Arguments
tabIndex
Integer - Specifies which tab (tree) to identify.
inspect
Boolean - If true returns the information for the inspected unit instead of the player. New with 2.3.

Returns
name
String - The name of that tab.
iconTexture
String - Path and file name of tab icon.
pointsSpent
Integer - Number of points put into that tab.
background
String - File name of background image.

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