WoW:API GetItemCooldown: Difference between revisions

m
Move page script moved page API GetItemCooldown to WoW:API GetItemCooldown without leaving a redirect
mNo edit summary
m (Move page script moved page API GetItemCooldown to WoW:API GetItemCooldown without leaving a redirect)
 
(5 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Stub/API}}
{{wowapi}}__NOTOC__
{{wowapi}}
Returns cooldown information for the item.
Returns cooldown information for the item.
startTime, duration, enable = GetItemCooldown(itemID)


<pre> startTime, duration, enable = GetItemCooldown("itemLink"); </pre>
==Parameters==


=== Arguments ===
=== Arguments ===
(itemID | "name" | "item link")
:(itemID)
;: itemId : Integer - The numeric ID of the item. ie. 12345


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


=== Returns ===
=== Returns ===
:startTime, duration, enable


(startTime, duration, enable)
:; 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.
;: startTime : Number - The time when the cooldown started (as returned by [[API GetTime|GetTime]]()) 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).
 
;: duration : Number - The number of seconds the cooldown will last, or zero if no cooldown.


;: enable : Boolean - 0 if no cooldown, 1 if item got cooldown.
== 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.
Anonymous user