Module cd

These functions help in retrieving information about spell and item cooldowns.

CD functions are the profile API table `cd` (br.api.profile.cd); profiles use it by name. For spell CDs, `spell` in the function represent the name in the actions list (Spec, Shared Class, Shared Global Lists) defined in Expansions// (Global.lua, /Class.lua, /.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

cd. () Gets the total time of the spell cooldown
cd. () Checks if spell is on cooldown or not.
cd. () Gets the duration of the spells Global Cooldown.
cd. () Checks if the spell is not on cooldown or is (opposite of cd.spell.exists()).
cd. () Gets the time remaining on spell cooldown or 0 if not.
cd. () Gets the time remaining on spell cooldown or 0 if not (alternate to cd.spell.remain() incase of typo).

cd.item

cd. () Gets the total cooldown time of the item in seconds.
cd. () Checks if item is on cooldown or not.
cd. () Gets the time remaining on item cooldown or 0 if not.

cd.slot

cd.slot.duration (slotID) Gets the base cooldown of a given item spell from an inventory slot (in seconds).
cd.slot.exists (slotID) Checks if the item slot is on cooldown or not.
cd.slot.ready (slotID) Checks if the item slot is off cooldown or not.
cd.slot.remain (slotID) Gets the time remaining on the equipment slot item cooldown or 0 if not.
cd.slot.remains (slotID) Gets the time remaining on the equipment slot item cooldown or 0 if not (alias for cd.slot.remain).


cd.spell

cd. ()
Gets the total time of the spell cooldown

Returns:

    number
cd. ()
Checks if spell is on cooldown or not.

Returns:

    boolean
cd. ()
Gets the duration of the spells Global Cooldown.

Returns:

    number
cd. ()
Checks if the spell is not on cooldown or is (opposite of cd.spell.exists()).

Returns:

    boolean
cd. ()
Gets the time remaining on spell cooldown or 0 if not.

Returns:

    number
cd. ()
Gets the time remaining on spell cooldown or 0 if not (alternate to cd.spell.remain() incase of typo).

Returns:

    number

cd.item

cd. ()
Gets the total cooldown time of the item in seconds.

Returns:

    number
cd. ()
Checks if item is on cooldown or not.

Returns:

    boolean
cd. ()
Gets the time remaining on item cooldown or 0 if not.

Returns:

    number

cd.slot

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

generated by LDoc 1.5.0 Last updated 2026-11-16 01:18:17