WoW:API GetSpellCooldown: Difference between revisions

m
1 revision
(Added: As of 3.3.x it is possible to use GetSpellCooldown(Spellid))
m (1 revision)
Line 5: Line 5:


==Arguments==
==Arguments==
:;spellName : String - name of the spell to retrieve cooldown data for.
:;spellName
:;spellID : Number - ID of the spell in the database
:: String - name of the spell to retrieve cooldown data for.
:;slotID : Number - Valid values are 1 through total number of spells in the spellbook on all pages and all tabs, ignoring empty slots.
:;spellID
:;bookType : String - BOOKTYPE_SPELL or BOOKTYPE_PET depending on whether you wish to query the player or pet spellbook.
:: Number - ID of the spell in the database
:;slotID
:: Number - Valid values are 1 through total number of spells in the spellbook on all pages and all tabs, ignoring empty slots.
:;bookType
:: String - BOOKTYPE_SPELL or BOOKTYPE_PET depending on whether you wish to query the player or pet spellbook.


==Returns==
==Returns==
:;startTime : Number - The time when the cooldown started (as returned by [[API GetTime|GetTime()]]); zero if no cooldown; current time if (enabled == 0).
:;startTime
:;duration : Number - Cooldown duration in seconds, 0 if spell is ready to be cast.
:: Number - The time when the cooldown started (as returned by [[API GetTime|GetTime()]]); zero if no cooldown; current time if (enabled == 0).
:;enabled : Number - 0 if the spell is active (Stealth, Shadowmeld, Presence of Mind, etc) and the cooldown will begin as soon as the spell is used/cancelled; 1 otherwise.
:;duration
:: Number - Cooldown duration in seconds, 0 if spell is ready to be cast.
:;enabled
:: Number - 0 if the spell is active (Stealth, Shadowmeld, Presence of Mind, etc) and the cooldown will begin as soon as the spell is used/cancelled; 1 otherwise.


==Example==
==Example==