OmniCC

OmniCC

54M Downloads

To perform effects earlier

martinjlowm opened this issue ยท 5 comments

commented

Would it be possible to have an option to choose an earlier time for when the effects are triggered?

I wrote an example and uploaded it here:
http://gist.github.com/651568

default value for OmniCC:GetEffectTimeOffset() would be 0 to fit the original behavior.

The reason I would like to have this feature is that my cooldown addon may hide the icons (that have a cooldown spiral) before the effect is triggered. So to have an offset would work around this perfectly.

commented

Don't mind this issue. I went back to relying on the cooldown widget's OnHide event, and then update the icon/button right away instead of waiting for it to drop and hide.

I no longer have use for this feature :)

commented

Hurray for less work for me :)

commented

Before I implement this, I'm curious as to why exactly you are hiding the cooldown spiral before the cooldown is done, and why the pulse is relevant when you choose to do so.

commented

I'm not hiding the spiral before the cooldown is done.
The problem is that if my function that hides the icon/button is called before UpdateText, the effect will never be triggered, as OmniCC's OnUpdate function will stop running when the frame is hidden.
If the effect happens, the time it takes for the effect to end is far too long to make it end completely.

Now that the effect is triggered when the time remaining hits 0 or less, only cooldown owners such as action buttons gets to finish the effect. My addon and auras (that own a cooldown spiral) are a bit of a problem here.

The pulse is relevant because it makes it easier to spot which abilities goes off cooldown. No big surprise here.
I already tried to play around with ending the cooldowns a second before it really did. But it doesn't quite fit with button smashing. And if I ended it later, my table with the active cooldowns wouldn't be updated in time, so I would miss a cooldown if I managed to cast a spell before the table was updated.

commented

perhaps we can try hooking cooldown:OnHide to force check the remaining time on a timer, and if its close enough to 0, then trigger the effect.