Thread Tools Display Modes
01-08-15, 04:22 PM   #1
Politig
A Chromatic Dragonspawn
AddOn Compiler - Click to view compilations
Join Date: May 2009
Posts: 176
CooldownPulse

Hi,

I'm wondering how ncCooldownFlash works. I'm learning lua at the moment, but can't seem to find how this addon can track spell cooldowns (link here: http://www.wowinterface.com/download...fanupdate.html). I see that in the LibCooldown.lua file, it reads some kind of information from the spellbook; when using this addon, some cooldowns are tracked, but not all of them. As a mage, Prismatic Crystal, Arcane Power, Blink*, Ice Barrier, and Counterspell seem to work, but Supernova and Frostjaw don't. Does anyone know why an addon of this type that just reads info from the spellbook might work for some spells but not others?

Thanks!
  Reply With Quote
01-09-15, 07:47 AM   #2
def9
A Cobalt Mageweaver
 
def9's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2008
Posts: 219
That has't been updated in along while. However Doom Cooldown Pulse has been updated on Github from the looks of it. It may have your issues fixed in it and if not leave a comment there the author is more likely to check there for errors with the mod first.
__________________
Epiria, level 100 Ret/Holy Paladin
Simkin level 100 Combat Rogue
Feldeemus, level 100 Arcane Mage

Last edited by def9 : 01-09-15 at 07:48 AM. Reason: s[elling
  Reply With Quote
01-09-15, 01:20 PM   #3
Politig
A Chromatic Dragonspawn
AddOn Compiler - Click to view compilations
Join Date: May 2009
Posts: 176
My goal is to try and update the addon myself. I'm not sure what has changed to make it so that the addon wouldn't work anymore, which is what I was hoping someone else in the community might be able to help me find.

I just like how ncCooldown has the nice borders
  Reply With Quote
01-09-15, 07:39 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
You're probably running into the same problem I recently solved in CoolLine, which I'm now maintaining. Since Cataclysm, and much much more in WoD, a spell isn't always a spell. A single spell ID can be any of a bunch of different spells at any given time depending on your spec, talents, and/or glyphs.

If you're using GetSpellBaseCooldown to determine which spells have cooldowns, then for spells that report no cooldown that way, you'll need to do another check to see if the current spell doesn't match the base spell for that ID, and if not, use tooltip scanning to read the current spell's tooltip and look for cooldown info:

Code:
local spellName = GetSpellBookItemName(index, bookType)
local slotType, spellID = GetSpellBookItemInfo(index, bookType)
local cd = GetSpellBaseCooldown(spellID)
if cd then
    -- Normal non-morphing spell with a cooldown.
elseif spellName ~= GetSpellInfo(spellID) then
    -- Morphing spell, use SetSpellBookItem and tooltip scanning to look for a cooldown.
    -- Useful global strings: SPELL_RECAST_TIME_MIN, SPELL_RECAST_TIME_SEC
end
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » CooldownPulse

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off