WoW:API GetItemCooldown: Difference between revisions

m
no edit summary
(Updated to match the current API boilerplate.)
mNo edit summary
Line 1: Line 1:
{{wowapi}} __NOTOC__
{{wowapi}}__NOTOC__
 
 
Returns cooldown information for the item.
Returns cooldown information for the item.
  startTime, duration, enable = GetItemCooldown("itemLink");
  startTime, duration, enable = GetItemCooldown(itemID or "itemName" or "itemLink")




=== Arguments ===
=== Arguments ===
:(itemID | "name" | "item link")
:(itemId or "itemName" or "[[itemLink]]")
:; 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]]" : String - The itemLink, when Shift-Clicking items.
:;itemName : String - The Name of the Item, ex: "Hearthstone"
:;[[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.
:; 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]] - 0 if no cooldown, 1 if item got cooldown.
:; enable : [[Boolean]] - ''false'' if no cooldown, ''true'' if item got cooldown.
Anonymous user