LibCooldownTracker-1.0

API

r1

lib:GetCooldownData(spellid)

Returns the raw data of a specified cooldown spellid.

Parameters

spellid


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.

Parameters

unitid
the unitid to unregister.