Module br.player.cd
These functions help in retrieving information about spell and item cooldowns.
CD functions are stored in br.player.cd and can be utilized by `local cd = br.player.cd` in your profile.
For spell CDs, `spell` in the function represent the name in the actions list (Spec, Shared Class, Shared Global Lists) defined in System/List/Spells.lua
For item CDs, `item` in the function represent the name in the item list defined in System/List/Items.lua
For slot CDs, `slot` in the function represents equipement slots, pass the ID matching the equipement slot id you wish to check.
-
cd.spell.exists ()
-
Checks if spell is on cooldown or not.
Returns:
boolean
-
cd.spell.remain ()
-
Gets the time remaining on spell cooldown or 0 if not.
Returns:
number
-
cd.spell.remains ()
-
Gets the time remaining on spell cooldown or 0 if not (alternate to cd.spell.remain() incase of typo).
Returns:
number
-
cd.spell.duration ()
-
Gets the total time of the spell cooldown
Returns:
number
-
cd.spell.ready ()
-
Checks if the spell is not on cooldown or is (opposite of cd.spell.exists()).
Returns:
boolean
-
cd.spell.prevgcd ()
-
Gets the duration of the spells Global Cooldown.
Returns:
number
-
cd.item.exists ()
-
Checks if item is on cooldown or not.
Returns:
boolean
-
cd.item.remain ()
-
Gets the time remaining on item cooldown or 0 if not.
Returns:
number
-
cd.item.duration ()
-
Gets the total cooldown time of the item in seconds.
Returns:
number
-
cd.slot.duration (slotID)
-
Gets the base cooldown of a given item spell from an inventory slot (in seconds).
Parameters:
- slotID
number The ID of the inventory slot.
Returns:
number The base cooldown of the item spell divided by 1000.
-
cd.slot.exists (slotID)
-
Checks if the item slot is on cooldown or not.
Parameters:
- slotID
number The ID of the inventory slot.
Returns:
boolean Inventory slot is on cooldown or not.
-
cd.slot.remain (slotID)
-
Gets the time remaining on the equipment slot item cooldown or 0 if not.
Parameters:
- slotID
number The ID of the equipment slot to check.
Returns:
number
-
cd.slot.remains (slotID)
-
Gets the time remaining on the equipment slot item cooldown or 0 if not (alias for cd.slot.remain).
Parameters:
- slotID
number The ID of the equipment slot to check.
Returns:
number
See also:
-
cd.slot.ready (slotID)
-
Checks if the item slot is off cooldown or not.
Parameters:
- slotID
number The ID of the equipment slot to check.
Returns:
boolean True if the slot is ready (not on cooldown).