WoW:API GetCompanionCooldown: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(New page: {{wowapi}} __NOTOC__ <!-- Describe the purpose of the function, exhausting detail can be saved for a later section --> Returns cooldown information about the companions you have. New in ...)
 
m (Move page script moved page API GetCompanionCooldown to API GetCompanionCooldown without leaving a redirect)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{wowapi}} __NOTOC__
{{wowapi}} __NOTOC__
<!-- Describe the purpose of the function, exhausting detail can be saved for a later section -->
Returns cooldown information about the companions you have. New in [[Patch 3.0]]
Returns cooldown information about the companions you have. New in [[Patch 3.0]]
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
  startTime, duration, isEnabled = GetCompanionCooldown("type", id)
  startTime, duration, isEnabled = GetCompanionCooldown("type", id)


== Parameters ==
== Arguments ==
=== Arguments ===
;type : String ([[companionType]]) - Type of the companion being queried ("CRITTER" or "MOUNT")
<!-- List each argument, together with its type -->
;id : Number - The slot id to query (starts at 1).
:("type", id)
 
:;type : String - The [[API TYPE TypeId|TypeID]] to query (e.g. "CRITTER", or "MOUNT")
:;id : Integer - The slot id to query (starts at 1).
 
=== Returns ===
<!-- List each return value, together with its type -->
:startTime, duration, isEnabled  <!-- remove this line if it's just one value -->
 
:;start : the time the cooldown period began
:;duration : the duration of the cooldown period
:;enabled : 1 if the companion has a cooldown, 0 otherwise


[[Category:World of Warcraft API]]
== Returns ==
;start : Number - the time the cooldown period began, based on {{api|GetTime}}().
;duration : Number - the duration of the cooldown period.
;isEnabled : Number - 1 if the companion has a cooldown.

Latest revision as of 04:45, 15 August 2023

WoW API < GetCompanionCooldown

Returns cooldown information about the companions you have. New in Patch 3.0

startTime, duration, isEnabled = GetCompanionCooldown("type", id)

Arguments[edit]

type
String (companionType) - Type of the companion being queried ("CRITTER" or "MOUNT")
id
Number - The slot id to query (starts at 1).

Returns[edit]

start
Number - the time the cooldown period began, based on GetTime().
duration
Number - the duration of the cooldown period.
isEnabled
Number - 1 if the companion has a cooldown.