WoWInterface (
-   Lua/XML Help (
-   -   Spell ID mouseover macro ... or something like that (

Dawn 09-10-15 03:11 AM

Spell ID mouseover macro ... or something like that
Is there a mouseover macro that puts out spellIDs to chat when you mouseover a buff?

Or an addon that adds spellIDs to your tooltip?

Issue is, I'm using a Tag in my oUF layout to track some buff durations. Using

UnitAura(u, GetSpellInfo())
or if it is a unique name simply by something like

UnitAura(u, "Enrage")
Which is fine and all, but one spell gives me a headache, namely Sacred Shield. I want to track it's duration, but not that of it's proc. Problem is the proc buff has the exact same name as the buff and even more so, even using the wowhead spellIDs for the buff, keeps setting the duration to that of the proc buff, at times. Not all the time though. Works fine for a few refreshes and once it is messed up, it stays messed up, aka it keeps tracking the freakin proc instead. :rolleyes:

All I care for is to keep track of the actual duration of the Sacred Shield buff so I can refresh it before it runs out.

I tried using spellIDs (from wowhead): 20925 and 148039. Same issue with both of those. I mean it's kinda shit that the proc has the same name, but can it even have the same freakin spellID? -.-

Any ideas?

Btw, this is the whole Tag, just in case...

local name, _,_,_,_,_, expirationTime, _ = UnitAura(u, GetSpellInfo(20925))
        if UnitAura(u, GetSpellInfo(20925)) then               
                local spellTimer = GetTime()-expirationTime
                local expire = -1*(GetTime()-expirationTime)
                local timeleft = format("%.0f", expire)
                if expire > 0.5 then
                        local spellTimer = "|cfffdff52"..timeleft.."|r"
                        return spellTimer

: I supsect the issue lies within GetSpellInfo() itself, since it also checks for the freakin name to identify a buff.


name, rank, icon, cost, isFunnel, powerType, castTime, minRange, maxRange
even if you are using a spellID instead of just the spell name. In this case the proc has the same name as the buff and thus it might get confused on timer refreshes with the proc being up. I can't think of a workaround in this case tho.

Lombra 09-10-15 03:38 AM

You can't use a name argument with UnitAura then. You have to iterate over all buffs using index and then compare against the buff spell ID return.

Phanx 09-16-15 04:22 PM

Also, you really don't need half those variables you're defining... if you're only going to use a value once, just use it. You don't need to assign one variable's value to another variable before you can use it. I'm also extremely confused about the logic behind doing "-1 * (x - y)" instead of just "y - x" when that's what you really want... o_O


        for i = 1, 40 do
                local _,_,_,_,_,_,expirationTime,_,_,_id = UnitBuff(u, i)
                if id == 20925 then
                        local timeLeft = expirationTime - GetTime()
                        if timeLeft > 0.5 then
                                return format("|cfffdff52%.0f|r", timeLeft)
                elseif not id then
                        -- no more buffs to look at

Dawn 09-16-15 11:29 PM

I just copy and pasted that, didnt give it another thought when it worked out of the box. Thanks for the heads up tho. ;)

All times are GMT -6. The time now is 08:41 AM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI