WoW API: GetTalentTabInfo

From AddOn Studio
Revision as of 19:53, 12 October 2007 by WoWWiki>Nayala (Add 2.3 inspect option.)
Jump to navigation Jump to search

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.