WoW:API GetNumTalentTabs: Difference between revisions
Jump to navigation
Jump to search
(Add 2.3 inspect option.) |
No edit summary |
||
| Line 22: | Line 22: | ||
;''Results'' : Displays the number of talents tabs one has. | ;''Results'' : Displays the number of talents tabs one has. | ||
---- | |||
;''Caveats'' | |||
There is a really annoying bug with this where it will sometimes return that there are 0 tabs. Doing a reload of the User Interface appears to clear it up, but that's of limited utility. Either avoid using this API, or include code to handle the case where it returns 0. | |||
Revision as of 06:18, 24 July 2009
Returns the total number of tabs of talents one has.
numTabs = GetNumTalentTabs([inspect]);
- Arguments
- inspect
- Boolean - If true returns the information for the inspected unit instead of the player. New with 2.3.
- Returns
- numTabs
- Integer - The number of tabs one has.
- Example
local numTabs = GetNumTalentTabs()
DEFAULT_CHAT_FRAME:AddMessage( numTabs )
- Results
- Displays the number of talents tabs one has.
- Caveats
There is a really annoying bug with this where it will sometimes return that there are 0 tabs. Doing a reload of the User Interface appears to clear it up, but that's of limited utility. Either avoid using this API, or include code to handle the case where it returns 0.