WoW:API GetTalentInfo: Difference between revisions
Jump to navigation
Jump to search
m ({{wowapi}}) |
mNo edit summary |
||
Line 9: | Line 9: | ||
:;tabIndex : Integer - Specifies which tab the talent is in. | :;tabIndex : Integer - Specifies which tab the talent is in. | ||
:;talentIndex : Integer - Specifies which talent | :;talentIndex : Integer - Specifies which talent in the given tab. | ||
'''Note:''' The talentIndex is counted | '''Note:''' The talentIndex is counted left-to-right, top-to-bottom. Meaning that the left-most talent in the top row is number 1, followed by the one immediately to its right being number 2. If there are no more talents to the right then it continues from the left-most talent on the next row. | ||
---- | ---- |
Revision as of 15:03, 5 June 2007
← WoW API < GetTalentInfo
Returns information about a specified talent in a specified tab.
nameTalent, iconPath, tier, column, currentRank, maxRank, isExceptional, meetsPrereq = GetTalentInfo(tabIndex, talentIndex);
- Arguments
- tabIndex
- Integer - Specifies which tab the talent is in.
- talentIndex
- Integer - Specifies which talent in the given tab.
Note: The talentIndex is counted left-to-right, top-to-bottom. Meaning that the left-most talent in the top row is number 1, followed by the one immediately to its right being number 2. If there are no more talents to the right then it continues from the left-most talent on the next row.
- Returns
- nameTalent
- String - The name of the talent in that tab.
- iconPath
- String - The path to the icon of the talent.
- tier
- Integer - The vertical grid position of the talent icon in its talent pane tab.
- column
- Integer - The horizontal grid position of the talent icon in its talent pane tab.
- currentRank
- Integer - The current rank (currently assigned talent points) of the talent.
- maxRank
- Integer - The maximum rank (maximum number of talent points) of the talent.
- isExceptional -
- meetsPrereq -
- Example
local numTabs = GetNumTalentTabs(); for t=1, numTabs do DEFAULT_CHAT_FRAME:AddMessage(GetTalentTabInfo(t)..":"); local numTalents = GetNumTalents(t); for i=1, numTalents do nameTalent, icon, tier, column, currRank, maxRank= GetTalentInfo(t,i); DEFAULT_CHAT_FRAME:AddMessage("- "..nameTalent..": "..currRank.."/"..maxRank); end end
- Results
- Displays the tab name then the talents name and current/maximum ranks for each talent in each tab.