GetTalentInfo/Wrath

From Warcraft Wiki
Jump to navigation Jump to search

Returns information about a talent.

name, iconTexture, tier, column, rank, maxRank, isExceptional, available, previewRank, previewAvailable 
   = GetTalentInfo(tabIndex, talentIndex [, isInspect[, isPet[, groupIndex]]])

Arguments

tabIndex
number - Ranging from 1 to GetNumTalentTabs()
talentIndex
number - Ranging from 1 to GetNumTalents(tabIndex).
isInspect
boolean? = false - If true, returns info for the current inspect target (see NotifyInspect).
isPet
boolean? = false - If true, returns info for the player pet.
groupIndex
number? = 1 - Which dualspec talent group to query (1 for primary, 2 for secondary). If isInspect is false this defaults to the currently active talent group instead.

Returns

1. name
string
2. iconTexture
number : FileID
3. tier
number - The row/tier that the talent sits on.
4. column
number - The column that the talent sits on.
5. rank
number - The current amount of talent points for a talent.
6. maxRank
number - The maximum amount of talent points for a talent.
7. isExceptional
number - Returns 1 if the talent is the ultimate talent, e.g. [Penance], otherwise returns nil. Many talents can be tagged as such in a single row.
8. available
number - Supposed to return whether prerequisites are met. Always returns 1 for the player. When inspecting it is 1 if any points have been spent on it, otherwise nil.
9. previewRank
number - In talent preview mode it returns the previewed points on a talent, otherwise it returns the same as rank.
10. previewAvailable
number - Supposed to act as available in preview mode. Returns same as available because available doesn't seem to change based on points spent.

Details

  • The talent index supplied to this function should not be expected to map to the placement of a talent within its tree. Callers must use the tier and column return values to determine where a queried talent is located.

Example

Prints all existing talents of your class.

for i = 1, GetNumTalentTabs() do
	for j = 1, GetNumTalents(i) do
		print(i, j, GetTalentInfo(i, j))
	end
end

Patch changes

WoW Icon update.png Patch 1.13.2 (2019-08-26): Added.