WoW API: GetTalentPrereqs
Jump to navigation
Jump to search
Returns the tier and column of a talent's prerequisite, and if the talent is learnable.
Template:Code/Begin
tier, column, isLearnable = GetTalentPrereqs( tabIndex , talentIndex );
Template:Code/End
Parameters
Arguments
- (tabIndex, talentIndex)
- tabIndex
- Integer - Specifies which tab the talent is in.
- talentIndex
- Integer - Specifies which talent to check
Note: The talentIndex is counted as if it where a tree, meaning that the left most talent in the top most row is number 1 followed by the one immediate to the right is number 2, if there are no more talents to the right then it continues from the left most talent on the next row.
Returns
- tier, column, isLearnable
- tier
- Integer - The tier that the prerequisite talent sits on
- column
- Integer - The Column that the prerequisite talent sits on
- isLearnable
- Integer - Returns 1 if you have the necessary prereqisites already, nil otherwise.
Example
For a Warrior, checks the prerequisites for the talent "Flurry":
local tier, column, learnable = GetTalentPrereqs(2,16)
Result
tier = 4 column = 3 learnable = 1 if you have 5/5 in Enrage, nil otherwise
Details
If you select a talent with no prerequisites, the whole function returns nil