LibCooldown-1.0

From WowAce Wiki

Jump to: navigation, search

Register spell/item cooldowns to descriptive events. You can register spells, items to be watched and LibCooldown will handle triggering of cooldown start and cooldown end events.

Contents

LibCooldown-Spell-1.0

:AddSpellCoodown(spellName)

Add spell that should be monitored

Arguments

spellName
string - Name of the spell whose cooldown should be monitored

:DeleteSpellCooldown(spellName)

Delete spell that shouldn't be monitored anymore

Arguments

spellName
string - Name of the spell whose cooldown shouldn't be monitored anymore

:AddAllSpellCooldowns()

Monitor all (current) spells of spellbook

:DeleteAllSpellCooldowns()

Delete all monitored spells

Event: LibCD_SpellCooldownStart(spellName, spellID, duration)

Fires when cooldown of a spell has started

Returns

spellName
string - Name of the spell whose cooldown has started
spellID
number - Spells ID in spellbook
duration
number - Duration of cooldown

Event: LibCD_SpellCooldownEnd(spellName, spellID, startTime)

Fires when cooldown of a spell has ended

Returns

spellName
string - Name of the spell whose cooldown has started
spellID
number - Spells ID in spellbook
startTime
number - Time when the cooldown started

LibCooldown-Item-1.0

:AddItemCoodown(itemName OR itemID)

Add item that should be monitored

Arguments

itemName
string - Name of item whose cooldown should be monitored
itemID
number - ID of item whose cooldown should be monitored

:DeleteItemCooldown(itemName OR itemID)

Delete item that shouldn't be monitored anymore

Arguments

itemName
string - Name of item whose cooldown should be monitored
itemID
number - ID of item whose cooldown should be monitored

:AddAllItemCooldowns()

Add all equipped items and items from player inventory to monitor their cooldowns. This only adds items that actually have a cooldown. This also adds items like Mote Of Fire, Formulas, ect. Note: As for now, this will not permanently update monitored items. If news items are added they won't be monitored. This may change and will be noted!

:DeleteAllItemCooldowns()

Delete all monitored items

Event: LibCD_ItemCooldownStart(itemName, itemID, duration, bagID, slotID)

Fires when cooldown of an item has started

Returns

itemName
string - Name of item whose cooldown has started
itemID
number - ID of item whose cooldown has started
duration
number - Duration of cooldown
bagID
number - ID of bag in which the item was placed
slotID
number - ID inside bag in which the item was placed

Note: If bagID is nil, then item is currently equipped and slotID points to the equipped slot

Event: LibCD_ItemCooldownEnd(ItemName, ItemID, startTime, bagID, slotID)

Fires when cooldown of an item has vanished

Returns

itemName
string - Name of item whose cooldown has vanished
itemID
number - ID of item whose cooldown has vanished
startTime
number - Time when the cooldown started
bagID
number - ID of bag in which the item was placed
slotID
number - ID inside bag in which the item was placed

Note: If bagID is nil, then item is currently equipped and slotID points to the equipped slot

Event: LibCD_EquippedItemCooldownStart(ItemName, ItemID, duration, slotID)

Fires when cooldown of an item has started. This will only trigger for equipped items, by scanning through all slots that hold an item which may have a cooldown timer.

Returns

itemName
string - Name of item whose cooldown has vanished
itemID
number - ID of item whose cooldown has vanished
duration
number - Duration of cooldown
slotID
number - ID where item is equipped

Event: LibCD_EquippedCooldownEnd(ItemName, ItemID, startTime, slotID)

Fires when cooldown of an item has vanished. This will only trigger for equipped items, by scanning through all slots that hold an item which may have a cooldown timer.

Returns

itemName
string - Name of item whose cooldown has vanished
itemID
number - ID of item whose cooldown has vanished
startTime
number - Time when the cooldown started
slotID
number - ID where item is equipped
Personal tools
Support the Site