FANDOM


 
({{wowapi}}, format, -example)
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<center>'''GetPetActionCooldown''' </center>
+
{{wowapi}} __NOTOC__
 
 
Returns cooldown information for the pet action in the specified pet action bar slot.
 
Returns cooldown information for the pet action in the specified pet action bar slot.
+
startTime, duration, enable = GetPetActionCooldown(index);
local start, duration, enable = GetPetActionCooldown(petActionButtonId);
+
==Parameters==
+
===Arguments===
----
+
:; index : Number - The index of the pet action button you want to query for cooldown info.
;''Arguments''
+
===Returns===
+
:;startTime : Number - The time when the cooldown started (as returned by [[API GetTime|GetTime()]]) or zero if no cooldown
: petActionButtonId - the Id for the pet action button you want to query for cooldown info.
+
:;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)
----
 
;''Returns''
 
 
:(Number startTime, Number duration, Number enable)
 
 
:;startTime : The time when the cooldown started (as returned by [[API GetTime|GetTime()]]) or zero if no cooldown
 
:;duration : The number of seconds the cooldown will last, or zero if no cooldown
 
:;enable : 0 if no cooldown, 1 if cooldown is in effect (probably)
 
 
----
 
;''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}}
 

Latest revision as of 18:37, December 23, 2006

WoW API < GetPetActionCooldown

Returns cooldown information for the pet action in the specified pet action bar slot.

startTime, duration, enable = GetPetActionCooldown(index);

ParametersEdit

ArgumentsEdit

index 
Number - The index of the pet action button you want to query for cooldown info.

ReturnsEdit

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)
Community content is available under CC-BY-SA unless otherwise noted.