WoW:API GetPetActionCooldown: Difference between revisions
Jump to navigation
Jump to search
GetPetActionCooldown
m (Categorization and formatting) |
mNo edit summary |
||
Line 35: | Line 35: | ||
---- | ---- | ||
{{Template:WoW API}} | {{Template:WoW API}} | ||
[[Category:API Functions|GetPetActionCooldown]] | |||
[[Category:API Pet Functions|GetPetActionCooldown]] | [[Category:API Pet Functions|GetPetActionCooldown]] |
Revision as of 12:25, 30 August 2005
Returns cooldown information for the pet action in the specified pet action bar slot.
startTime, duration, enable = GetPetActionCooldown(index);
- Arguments
- (index)
- index
- Number - The index of the pet action button you want to query for cooldown info.
- Returns
- (startTime, duration, enable)
- 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)
- 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.