LibCooldownTracker-1.0

r2

lib:GetCooldownData(spellid)

Parameters

lib:GetCooldownsData()

Returns the raw data of all the cooldowns.
See the cooldowns_*.lua data files for more details about its structure.

lib:GetUnitCooldownInfo(unitid, spellid)

Returns a table with the state of a unit's cooldown, or nil if there is no state stored about it.

Parameters

unitid

The unit unitid

spellid

The cooldown spellid

Return value

The table returned by this function contains the following values (times are as returned by GetTime()):
["cooldown_start"] = time
["cooldown_end"] = time
["used_start"] = time
["used_end"] = time
["detected"] = boolean # true if the unit has been detected using this spell before (useful to confirm is a unit has a specific talent or glyph)>>

lib:IterateCooldowns(class, specID, race)

Iterates over the cooldowns that apply to a unit of the specified class, specID and race.

Parameters

class

The unit class. Can be nil.

specID

The unit talent spec ID. Can be nil.

race

The unit race. Can be nil.

lib:RegisterUnit(unitid)

Registers an unit to be tracked by the library.
While the same unit may be registered more than once, it is important that
UnregisterUnit is called exactly once for each call to RegisterUnit.

Parameters

unitid

The unitid to register.

lib:UnregisterUnit(unitid)

Unregisters an unit.
While the same unit may be registered more than once, it is important that
UnregisterUnit is called exactly once for each call to RegisterUnit.