RichSteini / WeakAuras2-TBC-2.4.3

GNU General Public License v2.0
9 stars 9 forks source link

Debuff Timers for Debuffs on Players not showing #27

Open cpevors opened 1 month ago

cpevors commented 1 month ago

I have a total of four (4) WeakAuras -- one that tracks Player Buffs, Player Debuffs, Target Buffs, Target Debuffs. Everything is working brilliantly, except when a mob places a debuff on my character. The Player Debuffs WeakAura correctly indicates with an Icon that I have a debuff, but I cannot get a %p timer to appear.

As a corollary, debuffs that I put on mobs plainly have a %p timer.

This is especially confounding since, in creating these WeakAuras, I effectively duplicated each Buff WeakAura and just changed the Unit in the Trigger from Player to Target or vice versa. If it works with my debuffs, I'm flummoxed why it won't work with debuffs applied to me from other players/mobs.

You can see that the mob's debuffs have timers while my debuff does not in the below screenshot. WoWScrnShot_101424_003239

When creating the Player Debuff WeakAura, I clearly stipulate that Text 2 should display %p text, and that that text should be shown. If you notice below the WeakAura screen, on the sample WeakAura, the timer is running as I would expect. WoWScrnShot_101424_003742

EDIT: Interestingly, if I use GM command .aura 39271 (which is the same Dread Poison debuff that the mob in the screenshot applies), the WeakAura triggers with a timer. When the mob itself applies the debuff, however, it does not trigger with a timer. WoWScrnShot_101424_004328

When I apply the aura through a command, the WeakAura, when I hover over the icon, correctly indicates the remaining time, as well. When the mob applies the debuff and I hover over the icon without the timer, there is no remaining time. It's as if WeakAuras cannot capture the debuff timer when a mob applies a DoT. Not sure if that's a limitation of the API in any way. WoWScrnShot_101424_004623

WoWScrnShot_101424_004642

Which version of WeakAuras are you using? I tried the most recent release, 4.0.5, and then a few older versions, as far back as 4.0.1. I had the same issue is all releases, regrettably.

I appreciate the help, if you happen to take a look at this.

EDIT: I believe this has everything to do with the debuffs not having duration data in their tooltips. If I had a %c progress function, like the below, timers do appear, but because they are deemed as having 'no duration' they always appear with a 1 minute timer.

function(start_time,max_duration)
    -- Buffs with no duration return start_time as infinite
    if start_time ~= math.huge then
        -- Round up when more than 1min remaining
        local minutes = (start_time-GetTime())/60>1 and math.ceil((start_time-GetTime())/60) or (start_time-GetTime())/60
        local minutes_string = string.format("%dm",minutes)
        local seconds_string = string.format("%02ds", math.floor((start_time-GetTime())%60))
        return (minutes>1 and minutes_string or seconds_string)
    end
    return nil
end

(I run an up-to-date CMaNGOS server.)

cpevors commented 1 month ago

To add to this: debuffs are showing as buffs pretty reliably. Submitted a Pull Request that, through my testing, has seemingly resolved the issue entirely.

The only linger issuing is that debuffs are still lacking timers.