WoW:API GetActionCooldown

From AddOn Studio
Revision as of 11:19, 13 September 2005 by WoWWiki>Mrfrippe
Jump to navigation Jump to search
GetActionCooldown -Documentation by Sarf-

Retrieves the cooldown data of the action specified.

local start, duration, enable = GetActionCooldown(v.id);

Arguments
(Number actionID)
actionID
The ID of the action button to retrieve cooldown data for

Returns
(Number startTime, Number duration, Number enable)
startTime
The time when the cooldown started (as returned by GetTime()) or zero if no cooldown
duration
The number of seconds the cooldown will last, or zero if no cooldown
enable
seems to always be 1

Example
local start, duration, enable = GetActionCooldown(v.id);
if ( start > 0 and duration > 0 and enable > 0) then
	-- do stuff when cooldown is under effect
else
	-- do stuff when cooldown is not active
end
Result

Retrieves data. Does not (to my knowledge) actually change anything.


Description
Retrieves data on the cooldown on a specific action button.

(This doesn't seem to work in Macros (or perhaps not at all) it always triggers the "not active" part. Crash 19:09 05-06-2005)


Template:WoW API