When a spell is overridden by another, our cooldown bar stops being able to track it. Normally this is fine if the spell completely changes as you probably don't expect a cd bar for Backstab to track Gloomblade.
But when the overridden spell shares the same name as the base spell, such as Fire Breath for Evokers with the Font of Magic talent, you very much would expect the bar to track both.
With this fix, tracking the base spell will show the cd for the overridden version as well.
GetSpellCooldown used to return 1 for "has duration", but the new native version returns true. Fun.
Additionally, it looks like the events triggering UpdateCustomBarEvent() are passing a nil argument that the mod thought was supposed to be the affected unit. So I also fixed that, though I don't know if that's an 11.x thing or not.
https://www.wowace.com/projects/ice-hud/issues/363
Apparently we don't have to do any of this anymore (and might not have had to do it for a long time, but I missed the memo) so if we can, just use the built-in menuing stuff. Setting focus doesn't trigger taint with this.
I don't have beta access so I can't test this yet, but this should catch everything in the Deprecated_11_0_0 file in wow's official ui source as well as some stuff not mentioned but reported by users.
Specifically the Algarian Stormrider which has a different flavor of Vigor widget with customized colors. Apparently that's a whole different widget id. So now instead of checking for just the one vigor widget, we look up all widgets in the vigor set and use those to see if any vigor bar is showing.
Apparently other things are now using the game's UIWidgetPowerBarContainerFrame but we're forcing it to be hidden due to a variety of factors. This attempts to restrict the Hide behavior of that frame to only when we're Dragonriding.
Seems like UnitPowerMax for the AlternateMount power returns the actual max from PLAYER_ENTERING_WORLD until you mount and then dismount a Dragonriding mount. This wasn't previously the case.
Now we rely on the native widget info to tell us whether it believes it should be on or not.
I explicitly added what I believe to be the spell id for the new Grotto Netherwing Drake so it *should* work regardless, but then also discovered that the flying mount's UnitPowerMax is 0 unless you're on a Dragonriding mount, so that should be the longer-term fix for whenever old-world mounts add Dragonriding capability (10.1.5?).
This displays the Vigor charges for the player whenever they're on a Dragonriding mount (which is detected via explicit buff ID scanning from a hardcoded list...I'd like to make that more robust so I don't have to keep up with new mounts being added, but I'm not sure how to do it another way just yet). The Alternate Power bar is hidden if the Vigor module is enabled so that we don't end up with duplicate Vigor trackers (although right now it flashes on the screen before the mount buff is detected, so I'd also like to fix that...).
I've effectively had to implement my own Vigor module from scratch by poking into the internals of the Vigor widget by its ID in order to determine the recharge amount on the final Vigor charge because there's currently no API to get this information otherwise. Hopefully this gets added; if it does, I'll happily rip out this widget inspection junk. Aside from the partial charge stuff, this is just a skinned version of an Alternate Power indicator that only shows when the user is on a dragonriding mount. ClassPowerCounter doesn't sound like a particularly appropriate base class for this, but since Vigor is implemented as Alternate Power, it worked out nicely.
This adds more robust visuals on the power counters where we can (finally) display artwork similar to the default UI where the charges are sometimes framed by something and sometimes have a textured background behind empty charges. This doesn't yet add support for animations. Child classes can take advantage of this simply by implementing GetFrameAtlas() and/or GetBackgroundAtlas().
Note: as part of this, I moved the rune texture's layer to "BORDER" which doesn't feel quite appropriate, but does allow the layering to work as I want. I don't think this is going to be an issue since texture layers should only apply internal to a frame's strata (meaning this shouldn't suddenly cause an existing power counter to display above/below something else), but I wanted to document it in case something weird does come up later.
I also hardcoded a + 10 on the width/height for the frame since that's what works for Vigor. If those values don't work for any future users of this, it's easily adjusted.
This adds support for a class power counter that has a visible recharge on the final "rune." Most power counters are either fully ready or full un-ready (where the recharge is hidden away), but Dragonriding's Vigor resource does show the recharge of the final point, which this now supports.
Child classes can support this by setting self.partialReady to the index of the rune that's partially ready, and self.partialReadyPercent to the percentage that that final rune is ready (0.0-1.0). If the partially-charged point uses a different texture, the child can also implement GetPartialRuneAtlas() and it will be used only for the partially-ready rune.
If we ever need to be able to show multiple partially-ready runes, this will need a small refactor.
This isn't used anywhere else, so there's no reason for it to pollute the global namespace. And being local now, it also doesn't need the IceHUD prefix on its name.
This enables a simpler method of making sure the appropriate texture is set and using the appropriate color (for after a rune was modified to darkened/hidden).