WoW:API GetItemCooldown: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
Line 16: Line 16:
:; 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).

Revision as of 00:56, 28 October 2008

WoW API < GetItemCooldown

Returns cooldown information for the item.

startTime, duration, enable = GetItemCooldown(itemID or "itemName" or "itemLink")


Arguments

(itemId or "itemName" or "itemLink")
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

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).