oUF

97.2k Downloads

AltPowerBar Buff Timers

Haleth opened this issue ยท 12 comments

commented

Seems like a new interface element introduced in 4.3. It appears at some Darkmoon Faire games and shares a lot with the alt power bar, but both can be shown at the same time.

https://github.com/tekkub/wow-ui-source/blob/ptr/FrameXML/UnitPowerBarAlt.lua

http://img847.imageshack.us/img847/5107/wowscrnshot120511095336.jpg

commented

Is the Darkmoon Fair the only thing that uses the couter bar system?

commented

Please take a look at https://github.com/oUF-wow/oUF/tree/player-buff-timer for a WIP implementation of this. I opted for a separate element and pushed it unfinished in order to get feedback before the Darkmoon Fair ends.

To be yet included:

  • tooltips?
  • documentation
  • PostCreateTimer callback?
  • timer placement options (see TODOs in the code)

I only found the 3 darkmoon fair quests ("It's Hammer Time", "He Shoots, He Scores!" and "Tonk Commander") that use this. And only "Tonk Commander" does not have a normal buff to track the remaining time, so it's actually only one quest that "really" needs this.

Minimal layout implementation is simply self.PlayerBuffTimers = {}, where self is the player frame.

You could also use something like that if you prefer normal cooldown buttons over bars:

EDIT: read the code for now

commented

Darkmoon Faire is back again, so I went to investigate.

The bar is called BuffTimerN, and is part of the CounterBar elements of UnitPowerBarAlt.
https://github.com/tekkub/wow-ui-source/blob/live/FrameXML/UnitPowerBarAlt.lua#L705-824

Events:
UNIT_POWER_BAR_TIMER_UPDATE (arg1 = unit)

Functions:
duration, expiration, barID, auraID = UnitPowerBarTimerInfo(unit, index)

I'm going to write a test element and see how that works out, probably naming it CounterBar.

commented

Finished the element, although it might not be an optimal solution to all the power bars implemented in 4.3.

The AltPowerBar element by Blizzard handles a wide range of different stuff, which all are running of the same few events.
The elements I'm talking about is the following:

  • Horizontal statusbar
  • Vertical statusbar
  • Circular statusbar
  • Counters (like the one shown under the statusbar in op's screenshot, counting points)
  • "Pills" (used for the ring toss daily in Darkmoon Faire)

I will leave my finished element just in case.
https://gist.github.com/1771480

commented

Correct me if I'm wrong, but as far I've seen its purely visual and doesnt give any useful information.

commented

It actually does. There is no other way to see your time remaining otherwise. The counter below that (which is, actually, the AltPowerBar) shows the current/maximum of the objective you need, not the time.

commented

Yeah, that one should be covered by the AltPowerBar element. The bottom one (the counter) I don't know, as it seems like its just for show.

commented

The bottom one -is- the AltPowerBar, surprisingly (and is also covered by the element). The buff timer, however, isn't. Hence the suggestion.

commented

I was talking about the counter, not the AltPowerBar itself.
As for the cur/max of objective, you have that in the questlog already, even more readable.

commented

The top bar is the buff timer I'm talking about, and is the only representation of the time remaining.

commented

Was planning on having a look at it today, but yesterday was apparently the last day of darkmoon fair. I'm not really sure how I should support it either, might just make it its own element.

commented

Any chance of getting this implemented? :)