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

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

cd.item

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

cd.slot

cd.slot.duration (slotID) This function gets the base cooldown of a given item spell from an inventory slot, specific to the player character in game.
cd.slot.exists (slotID) This function returnsif the item slot is on cooldown or note
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.
cd.slot.ready (slotID) Returns if the item slot is off CD or not


cd.spell

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

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

cd.slot.duration (slotID)
This function gets the base cooldown of a given item spell from an inventory slot, specific to the player character in game.

Parameters:

  • slotID - The ID of the inventory slot.

Returns:

    number - The base cooldown of the item spell divided by 1000. This division is done to convert the time from milliseconds to seconds.
cd.slot.exists (slotID)
This function returnsif the item slot is on cooldown or note

Parameters:

  • slotID
cd.slot.remain (slotID)
Gets the time remaining on the equipment slot item cooldown or 0 if not.

Parameters:

  • slotID - 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.

Parameters:

  • slotID - The ID of the equipment slot to check.

Returns:

    number

See also:

cd.slot.ready (slotID)
Returns if the item slot is off CD or not

Parameters:

  • slotID - The ID of the equipment slot to check.

Returns:

    number
generated by LDoc 1.5.0 Last updated 2024-11-26 17:42:33