LunaUnitFrames

LunaUnitFrames

268k Downloads

Buff timers text

sipertruk opened this issue ยท 10 comments

commented

Hello I'm trying to set this nice ui as my default and i can't have timers text shown on my buffs as stated in the wiki, nor spinning thing.

I tried different release versions and numerous things, so far nop won't work.. I haven't looked at the code yet.

commented

It is kinda difficult to implement this.
Tge function that returns buff and stuff is NOT returning the time that the buff lasts.
So you need to check target / casting / casting success / swotch target etc. its really hard to implement and very buggy. Blizzard implemented the buff timers in later patches.

Tl;dr: will not be implemented.

commented

I get e-mail notifications from posts here. And yes, GetPlayerBuffTimeLeft(buffIndex) returns the time left on a buff. It doesn't give you the timestamp when the buff was applied though. But you need that to show how much the spinning thing has progressed. I solved this in version 1.x by letting the addon create a database of every buff duration when a new one is applied. You also need to make the player buffs respond to PLAYER_AURAS_CHANGED instead of UNIT_BUFF because time data might not be avialable when UNIT_BUFF is fired.
Also:

  • This feature is not in 2.X because i never got to do it before Nost went down. And now i don't play vanilla anymore so i lost interrest.
  • The whole buff/debuff system is essentially a quick copy of the 1.X one adapted to the new layout. I had some plans for it.
  • And no, you can't easily copy the timer function over from 1.X
commented

I forked and added text timers under the buff bars in 63b841a.
It's still experimental and ugly, buff timers texts overlap the debuff bar.
Also added right click right click cancel buff, the current event handler was void.

commented

Is there something wrong with GetPlayerBuffTimeLeft(buffIndex)? Seems to work fine, and calling it on a hook for UNIT_BUFF should get you a close approximation of the max duration, too.

On another note, is there any irc channel or email address that can be used to get in touch with Aviana?

commented

The reason I asked for a way to contact you was that i had a few questions that are not neccessarily related to LunaUF.
I've been spending the last few weeks writing a modern castbar usable in vanilla, and i figured I'd ask you for a few points of advice, seeing you spent quite some time in vanilla developing recently. Here works just as well i guess.

  1. Is there any reason you are not using a library for sharing media files between addons? I know that LibSharedMedia doesnt exist until 2.0, but is there any specific reason for that? What about libs such as "Surface-1.0"?
  2. What about copyright on textures? Did you run around getting permissions, or are they pretty much public domain?
  3. Do you know anything about a crash when moving frames around the screen, or do you have any advice for debugging client crashes caused by the addon in general?

And lastly, is your internal "TODO list" for Luna2.0 available anywhere? If you've no intention of working anymore on Luna for the time being, it would help to know where to start.

commented

Here is a general rule of thumb:
If you want to maintain your own version make a fork and publish your changes there. If you just want to make one addition but have it coded nicely and not like a "hack" then submit a pull request and i will review it and merge it into the code. If you want a quick and dirty fix for something that is rather specific just fix it locally for you.

  1. Surface-1.0 only supports textures and if i remember correctly was rather ancient in its design. I thought about using it but for some reason didn't.
  2. They are public domain since they came from LibSharedMedia
    or other addons that have a corresponding license.
  3. Yes the classic client can crash when moving frames around. This is a bug in the vanilla client and there is absolutely NOTHING you can do about that.

The to-do list would be the issues list here plus what was in my head.

Also note that i have NOT abandoned this. I might come back and start working on it again. Also i promised to fix big flaws if they emerge.

commented

My intent is to make something clean and make a pull request.
So I have coded text timers on the player's unit auras frame.
Here's the result :
aurastimer
options
Any advice and test result is welcome.
To test it : https://github.com/sipertruk/LunaUnitFrames/archive/master.zip

commented

Works great sipertruk! I thought a size 12 font was a little too big for me, so I had to change it to 8 in the .lua file as there was a bunch of text overlap since I like my buff icons on the small side. I'd add a setting for the text size in the menu options there.

I think it would also be useful to have the timer on enemy debuffs, dots, etc. too. Thanks for this!

commented

Thank you for trying it. I have added sliders for fonts size.
Also a buff time db as suggested by Aviana, saved in the addon settings like in 1.x but per character/server so now the cooldown animation should be ok in almost every case.

commented

Submitted pull request #129

options
unit