WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   CooldownPulse (https://www.wowinterface.com/forums/showthread.php?t=51464)

Politig 01-08-15 04:22 PM

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!

def9 01-09-15 07:47 AM

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.

Politig 01-09-15 01:20 PM

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 :p

Phanx 01-09-15 07:39 PM

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



All times are GMT -6. The time now is 11:14 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI