Markemartin@legacy41556394 (talk | contribs) No edit summary |
Ravas46950@legacy41566517 (talk | contribs) (UnitCharacterPoints returns a second value for how many professions the unit has.) |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{wowapi}} |
||
− | Returns the number of unspent talent points of the |
+ | Returns the number of unspent talent points of the specified unit and the number of learned professions. |
− | local unspentTalentPoints = UnitCharacterPoints("player") |
+ | local unspentTalentPoints, learnedProfessions = UnitCharacterPoints("player") |
---- |
---- |
||
;''Arguments'' |
;''Arguments'' |
||
− | :( |
+ | :([[unitId]]) |
:;arg1 : The unit to query ("player" -- "target", and the like, does not work and always returns 0) |
:;arg1 : The unit to query ("player" -- "target", and the like, does not work and always returns 0) |
||
Line 12: | Line 13: | ||
;''Returns'' |
;''Returns'' |
||
− | :Unspent Talent points viewable by the player. |
+ | :Unspent Talent points viewable by the player and the number of currently learned professions. |
− | :; unspentTalentPoints : The quantity of unspent talent points |
+ | :; unspentTalentPoints : Number - The quantity of unspent talent points the unit has available. |
+ | :; learnedProfessions : Number - The number of professions the unit already knows. |
||
---- |
---- |
||
;''Example'' |
;''Example'' |
||
− | DEFAULT_CHAT_FRAME:AddMessage( "You have " .. |
+ | DEFAULT_CHAT_FRAME:AddMessage( "You have " .. UnitCharacterPoints("player") .. " unspent Talent Points.") |
;''Result'' |
;''Result'' |
||
Line 31: | Line 33: | ||
: Returns unspent talent points a player has or always 0 if an invalid unit type is specified. |
: Returns unspent talent points a player has or always 0 if an invalid unit type is specified. |
||
− | |||
− | ---- |
||
− | {{Template:WoW API}} |
||
− | [[Category:API Functions|UnitClass]] |
||
− | [[Category:API Unit Functions|UnitClass]] |
Revision as of 19:28, 6 June 2007
Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Returns the number of unspent talent points of the specified unit and the number of learned professions.
local unspentTalentPoints, learnedProfessions = UnitCharacterPoints("player")
- Arguments
- (unitId)
- arg1
- The unit to query ("player" -- "target", and the like, does not work and always returns 0)
- Returns
- Unspent Talent points viewable by the player and the number of currently learned professions.
- unspentTalentPoints
- Number - The quantity of unspent talent points the unit has available.
- learnedProfessions
- Number - The number of professions the unit already knows.
- Example
DEFAULT_CHAT_FRAME:AddMessage( "You have " .. UnitCharacterPoints("player") .. " unspent Talent Points.")
- Result
Prints the how many talent points the player has unspent.
You have 0 unspent Talent Points.
- Description
- Returns unspent talent points a player has or always 0 if an invalid unit type is specified.