WoW:API GetItemCooldown: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
m (Move page script moved page API GetItemCooldown to API GetItemCooldown without leaving a redirect)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{wowapi}}__NOTOC__
{{wowapi}}__NOTOC__
Returns cooldown information for the item.
Returns cooldown information for the item.
  startTime, duration, enable = GetItemCooldown(itemID or "itemName" or "itemLink")
  startTime, duration, enable = GetItemCooldown(itemID)




=== Arguments ===
=== Arguments ===
:(itemId or "itemName" or "[[itemLink]]")
:(itemID)


:;itemId : Integer - The numeric ID of the item. ie. 12345
:;itemID : Integer - The numeric ID of the item. ie. 12345
:;itemName : String - The Name of the Item, ex: "Hearthstone"
:;[[itemLink]] : String - The [[itemLink]], when Shift-Clicking items.


=== Returns ===
=== Returns ===
Line 16: Line 14:
:; startTime : Number - The time when the cooldown started (as returned by [[API GetTime|GetTime()]]) or zero if no cooldown.
:; startTime : Number - The time when the cooldown started (as returned by [[API GetTime|GetTime()]]) or zero if no cooldown.
:; duration : Number - The number of seconds the cooldown will last, or zero if no cooldown.
:; duration : Number - The number of seconds the cooldown will last, or zero if no cooldown.
:; enable : [[Boolean]] - ''false'' if no cooldown, ''true'' if item got cooldown.
:; enable : Number - 1 if the item is ready or on cooldown, 0 if the item is used, but the cooldown didn't start yet (e.g. potion in combat).
 
== Notes ==
As of patch 4.0.1, you can no longer use this function to return the Cooldown of an item link or name, you MUST pass in the itemID.

Latest revision as of 04:46, 15 August 2023

WoW API < GetItemCooldown

Returns cooldown information for the item.

startTime, duration, enable = GetItemCooldown(itemID)


Arguments[edit]

(itemID)
itemID
Integer - The numeric ID of the item. ie. 12345

Returns[edit]

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
Number - 1 if the item is ready or on cooldown, 0 if the item is used, but the cooldown didn't start yet (e.g. potion in combat).

Notes[edit]

As of patch 4.0.1, you can no longer use this function to return the Cooldown of an item link or name, you MUST pass in the itemID.