m
Move page script moved page API GetActionCooldown to WoW:API GetActionCooldown without leaving a redirect
m (Move page script moved page API GetActionCooldown to WoW:API GetActionCooldown without leaving a redirect) |
|||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{wowapi}} __NOTOC__ | |||
Retrieves the cooldown data of the action specified. | Retrieves the [[cooldown]] data of the action specified. | ||
start, duration, enable = GetActionCooldown(slot) | start, duration, enable = GetActionCooldown(slot) | ||
== Parameters == | == Parameters == | ||
<big>'''Arguments'''</big> | |||
: | |||
:;slot : Integer - The [[ActionSlot|action slot]] to retrieve data from. | |||
<big>'''Returns'''</big> | |||
:start, duration, enable | :start, duration, enable | ||
:;start : Number - The time at which the current cooldown period began ( | :;start : Number - The time at which the current cooldown period began (relative to the result of [[API GetTime|GetTime]]), or 0 if the cooldown is not active or not applicable. | ||
:;duration : Number - The duration of the current cooldown period in seconds, or 0 if the cooldown is not active or not applicable. | :;duration : Number - The duration of the current cooldown period in seconds, or 0 if the cooldown is not active or not applicable. | ||
:;enable : Number - Indicate if cooldown is enabled, is greater than 0 if a cooldown is active, and 0 if a cooldown cannot be active. | :;enable : Number - Indicate if cooldown is enabled, is greater than 0 if a cooldown is active, and 0 if a cooldown cannot be active. This lets you know when a shapeshifting form has ended and the actual countdown has started. | ||
== Example == | == Example == | ||
<!-- begin code --> | <!-- begin code --> | ||
local start, duration, enable = GetActionCooldown(slot); | local start, duration, enable = GetActionCooldown(slot); | ||
| Line 34: | Line 27: | ||
end | end | ||
<!-- end code --> | <!-- end code --> | ||