TellMeWhen

TellMeWhen

24M Downloads

[CF 1269] Timer Sweep: Allow GCD and spells with charges

tmw-issue-import opened this issue ยท 4 comments

commented

Currently, the timer sweep setting for spell cooldown icons for spells with charges essentially ignores the "Allow Global Cooldown" option.

This can have my preferred behavior of showing the global cooldown sweep after use even with charges recharging and or remaining by altering a portion of Components\IconTypes\IconType_cooldown\cooldown.lua at line 189 from the current:

                start, duration = start_charge, duration_charge

To instead be:

                start, duration = GetSpellCooldown(iName)
                if not OnGCD(duration) or not icon.ClockGCD then
                    start, duration = start_charge, duration_charge
                end


Posted by CurseForge user canofbutter | Imported from CurseForge issue #1269 | Raw

commented

This is actually quite a bit more complicated than what you did above. ClockGCD is a setting for the CooldownSweep icon module. Using it to make decisions in a cooldown type breaks encapsulation, and also does not account for the other ways in which a GCD can be allowed (timer bars and DogTags). The code you gave assumes that the icon uses the regular icon display method. To properly display both the GCD and the charge timer on an icon requires some weird stuff that Blizzard introduced to their action bars in Legion which involves creating two timer sweeps on a single button. This isn't supported by Masque, so I wouldn't be able to implement this properly without breaking appearances for most users who skin their icons with Masque.

To do this properly, I would have to pass along some extra data to SetInfo, which incurs a (small) performance penalty, and since this is the first request for this feature that I've ever gotten in the whole time that spell charges have existed (4 years now), I can't see that the tradeoff of breaking Masque skinning and (ever so slightly) reduced performance would be worth it. If I implemented it so that the GCD just replaces the charge timer (which wouldn't break Masque), I think that many people would find it annoying that they could only see their charge timer when not in a GCD.


Posted by CurseForge user Cybeloras

commented

I hadn't considered other icon types (or issues with Masque), however perhaps there's an alternate way to accomplish this feature as desired without breaking any functionality by implementing it elsewhere in a different module. What about creating a new notification animation type for "gcd sweep." It could then be used with an "While Condition Set Passing" "gcd active" condition to then display that animation.


Posted by CurseForge user canofbutter

commented

I want to come in and echo this sentiment - I've been using a modified version similar to the code listed above, but with the downside of losing out on the charge sweeps.


Posted by CurseForge user bboyser8

commented

The most recent version made changes that seem to allow this behavior, though at the expense of the timer text always being visible; I'm assuming that's just a bug and will be fixed. I definitely appreciate the new change otherwise!

Edit: the bug was fixed quickly! This behavior is now working and maintains the charge timer as well as the gcd sweep. Awesome job, Cybeloras - thanks so much!


Edited Sep 19, 2016

Posted by CurseForge user canofbutter