WoW:API GetTalentPrereqs: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
''Edit By : Zealic''
{{wowapi}} __NOTOC__
-Function antetype :
prereqIconX , prereqIconY = GetTalentPrereqs( tabIndex , talentIndex );


-Args:
Integer tabIndex    : Talent tab index,
Integer talentIndex : Talent index,


-Return:
<!-- Describe the purpose of the function, exhausting detail can be saved for a later section -->
Integer prereqIconX : Prereq talent point X,
Returns the tier and column of a talent's prerequisite, and if the talent is learnable.
Integer prereqIconY : Prereq talent point Y,
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
#if not Prereq return nil.
{{Code/Begin}}
tier, column, isLearnable = GetTalentPrereqs( tabIndex , talentIndex );
{{Code/End}}


-Example:
--if talent is Warlock
x, y = GetTalentPrereqs(1,14);-- return x = 3, y = 3


== Parameters ==


emm...
<big>'''Arguments'''</big>
My english Name is '''Zealic''',come from China
<!-- List each argument, together with its type -->
Edit this Page at : 2005-08-11
:(tabIndex, talentIndex)
eMail : rszealic(at)gmail.com


{{template:WoW API}}
:;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.
 
<big>'''Returns'''</big>
<!-- List each return value, together with its type -->
:tier, column, isLearnable  <!-- remove this line if it's just one value -->
 
:;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 ==
<!-- If it helps, include an example here, though it's not required if the usage is self-explanatory -->
For a Warrior, checks the prerequisites for the talent "Flurry":
local tier, column, learnable = GetTalentPrereqs(2,16)
 
<big>'''Result'''</big>
<!-- If it helps, include example results here, though they are not required. You're allowed to cheat liberally since WoW isn't a command line language. -->
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

Revision as of 17:18, 29 December 2006

WoW API < GetTalentPrereqs


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