Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
Register
mNo edit summary
m ({{wowapi}})
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
  +
{{wowapi}}
<center>'''GetInventoryItemCooldown''' - ''Documentation by [[User:Flickering|Flickering]]''</center>
 
   
 
Get cooldown information for an inventory item.
 
Get cooldown information for an inventory item.
Line 9: Line 9:
   
 
:;unit : String - The [[API TYPE UnitId|UnitId]] of the unit whose inventory is to be queried.
 
:;unit : String - The [[API TYPE UnitId|UnitId]] of the unit whose inventory is to be queried.
:;slotId : Numeric - The inventory slot to be queried, obtained via [[API GetInventorySlotInfo|GetInventorySlotInfo]].
+
:;slotId : Numeric - The [[API TYPE InventorySlotID|inventory slot]] to be queried, obtained via [[API GetInventorySlotInfo|GetInventorySlotInfo]].
  +
 
=== Returns ===
 
=== Returns ===
 
:start, duration, enable
 
:start, duration, enable
Line 15: Line 16:
 
:;start : Numeric - The start time of the cooldown period, or 0 if there is no cooldown (or no item in the slot)
 
:;start : Numeric - The start time of the cooldown period, or 0 if there is no cooldown (or no item in the slot)
 
:;duration : Numeric - The duration of the cooldown period (NOT the remaining time). 0 if the item has no use/cooldown or the slot is empty.
 
:;duration : Numeric - The duration of the cooldown period (NOT the remaining time). 0 if the item has no use/cooldown or the slot is empty.
:;enable : Numeric - Not entirely sure what this is for, but it will be greater than 0 if a cooldown is active.
+
:;enable : Numeric - Returns 1 or 0. 1 if the inventory item is capable of having a cooldown, 0 if not.
----
 
 
__NOTOC__
 
__NOTOC__
{{Template:WoW API}}
 
[[Category:API Functions|GetInventoryItemCooldown]]
 
[[Category:API Inventory Functions|GetInventoryItemCooldown]]
 

Revision as of 07:51, 4 July 2006

Get cooldown information for an inventory item.

start, duration, enable = GetInventoryItemCooldown("unit", slotId)

Parameters

Arguments

("unit", slotId)
unit
String - The UnitId of the unit whose inventory is to be queried.
slotId
Numeric - The inventory slot to be queried, obtained via GetInventorySlotInfo.

Returns

start, duration, enable
start
Numeric - The start time of the cooldown period, or 0 if there is no cooldown (or no item in the slot)
duration
Numeric - The duration of the cooldown period (NOT the remaining time). 0 if the item has no use/cooldown or the slot is empty.
enable
Numeric - Returns 1 or 0. 1 if the inventory item is capable of having a cooldown, 0 if not.