m
bookType rather than tabNumber
No edit summary |
m (bookType rather than tabNumber) |
||
| Line 1: | Line 1: | ||
Retrieves the cooldown data of the spell specified. | Retrieves the cooldown data of the spell specified. | ||
local start, duration = GetSpellCooldown(spellID, | local start, duration = GetSpellCooldown(spellID, "bookType"); | ||
; | ; | ||
| Line 12: | Line 12: | ||
:;spellID : The ID of the spell to retrieve cooldown data for | :;spellID : The ID of the spell to retrieve cooldown data for | ||
:( | :(string bookType) | ||
:; | :;bookType : BOOKTYPE_SPELL or BOOKTYPE_PET depending on whether you wish to query the player or pet spellbook. | ||
---- | ---- | ||
| Line 28: | Line 28: | ||
---- | ---- | ||
;''Example'' | ;''Example'' | ||
local start, duration = GetSpellCooldown(spellID, | local start, duration = GetSpellCooldown(spellID, BOOKTYPE_SPELL); | ||
if ( start > 0 and duration > 0) then | if ( start > 0 and duration > 0) then | ||
Print('Please wait ' .. duration - ( GetTime() - start) .. ' seconds before using this spell.'); | Print('Please wait ' .. duration - ( GetTime() - start) .. ' seconds before using this spell.'); | ||