Flickering19966@legacy41540688 (talk | contribs) m (Categorization and formatting) |
m (format apitype) Tag: WoW API docs |
||
(7 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{wowapi}} __NOTOC__ |
||
− | <center>'''GetPetActionCooldown''' </center> |
||
⚫ | |||
− | |||
⚫ | |||
⚫ | |||
+ | ==Parameters== |
||
− | |||
⚫ | |||
⚫ | |||
⚫ | |||
− | |||
⚫ | |||
− | ---- |
||
⚫ | |||
⚫ | |||
⚫ | |||
− | |||
⚫ | |||
− | : (index) |
||
⚫ | |||
− | |||
− | ---- |
||
⚫ | |||
− | |||
− | :(startTime, duration, enable) |
||
− | |||
⚫ | |||
⚫ | |||
⚫ | |||
− | |||
− | ---- |
||
− | ;''Example'' |
||
− | for i=1, NUM_PET_ACTION_SLOTS, 1 do |
||
− | cooldown = getglobal("PetActionButton"..i.."Cooldown"); |
||
− | local start, duration, enable = GetPetActionCooldown(i); |
||
− | CooldownFrame_SetTimer(cooldown, start, duration, enable); |
||
− | end |
||
− | |||
− | ---- |
||
− | ;''Description'' |
||
− | |||
− | : Returns information on the specified pet action's cooldown timer. Note that this depends on having the action in a specific action bar slot. |
||
− | |||
− | ---- |
||
− | {{Template:WoW API}} |
||
− | [[Category:API Pet Functions|GetPetActionCooldown]] |
Latest revision as of 02:39, 22 July 2022
Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Returns cooldown info for an action on the pet action bar.
startTime, duration, enable = GetPetActionCooldown(index)
Parameters
Arguments
- index
- number - The index of the pet action button you want to query for cooldown info.
Returns
- startTime
- number - The time when the cooldown started (as returned by GetTime()) or zero if no cooldown
- duration
- number - The number of seconds the cooldown will last, or zero if no cooldown
- enable
- boolean - 0 if no cooldown, 1 if cooldown is in effect (probably)