It looks like the entire game-side code for runes and rune events have been re-done, so this module was failing to properly update rune availability. I've switched to a model of ignoring the rune index coming in from the update event and just rebuilding my internal state of rune availability/cooldown for all runes on each event (sometimes the incoming rune index was 32760 or a huge negative number...looks like garbage values). This is how the built-in rune frame is handling things now as well.
I also tweaked the shine fade-in to not create a new function every shine. Whoops.
Updated for:
- SPELL_POWER_* constants becoming Enum.PowerType.*
- Rank no longer existing in return values for UnitAura, UnitBuff, UnitDebuff, UnitCastingInfo, UnitChannelInfo
- UNIT_POWER event becoming UNIT_POWER_UPDATE
- UnitPopupFrames no longer existing
- Removed events: PLAYER_PET_CHANGED, UNIT_MAXPOWER, PET_BAR_CHANGED, UNIT_DYNAMIC_FLAGS
- Texture return value from UnitAura type changing (name -> id)
- All Warlock specializations using soul shards
- Death Knight rune changes
Haven't tested all classes/specializations yet, so I'm sure I missed some stuff.
Probably need to add support for the new circular cooldown wipe flourish added in the base client.
Saw a problem with cooldown flashes being delayed on DK runes becoming available that probably need to be fixed.
For any user that had existing counters (such as anyone who had savedata from before the time that Maelstrom, Lacerate, and Sunder were converted to custom counters automatically) in numeric mode, a 0 or faded graphical icon was showing up all the time after the recent change to enable showing empty counters. Now there's a checkbox for whether you want the empty/0 count to show or not.
For charges, being full is the default state, so we need to treat full the same as health or mana being full. (ticket #231)
Also fixed the "target" variable never getting set on custom counters or custom counter bars because they were overriding the PLAYER_TARGET_CHANGED event that the base class was registering.
Also also fixed numeric display mode for custom counters not using the correct gradient scaling when the number hit 0. It was using the same scaling as graphical mode where 0 displays nothing and needs to be accounted for separately.
This change is potentially contentious because it's a very old default, but with health and power values being so incredibly high in Legion, the shortened form of values is immensely more readable. This change will not affect those who have modified their text settings and the Short form only kicks in when values hit 10,000 or higher.
Only try to redraw if the maximum count exceeds the numbers of frames we have to display the count. If the maximum drops below the number of frames we have to display it, that's fine because the excess frames will just be hidden.
There's a case where custom counters seemingly get stuck with an outdated maximum number of charges (perhaps only when augmented by a talent such as with Throw Glaive). This may catch and fix it (I couldn't reproduce the problem with a starter DH since you need level 108 or something to get the second charge for Throw Glaive).
Changing this default has confused too many people, so let's put it back. Now this information is technically duplicated, but avoiding confusion is more important.
The player health bar will now show a (by default) faded white bar above the health for the amount of absorption the player currently has. The incoming heal bar starts above both the player health and the absorb, if any is present.
Also disabled the PlayerAbsorb bar by default since it's redundant. It can still be enabled separately if desired.
With runes being homogenized in 7.0, it makes a little less sense to adhere to the structure of specific runes being available/used. This adds an option to display the runes more like combo points where simple textures are shown to indicate how many runes are available. No cooldown or "soon-to-be-ready" type indicators are setup just yet since that problem is more difficult and my personal usage doesn't really need them right now.
Also added an option to show the Runes module any time the player has some runes that are recharging.
We were creating font factories every time the runes module was asked to redraw. Oops...
Also fixed the numeric frame's parent while I was in there so that it (in a future commit) will show and hide with the module properly.
Sometimes combo points can get stuck in a state where only 5 will draw on the screen even if the player has 6 max available. It's been really tough to reproduce, but I think the problem is that the frames are getting created but never having a texture set to them. This should fix that.
Looks like at some point I modified how "darkened" inactive powers worked and ended up drawing two copies of the darkened power counter for each inactive power. "runebg" is superfluous since we're just setting the color of the actual counter to black and partially transparent instead. For some power counters, such as Paladins, the runebg texture was actually wrong and drawing the entire atlas rather than just the texture we wanted.
Looks like some things changed in spellcast events on 7.0 which necessitate using the spellcast GUID to identify when a specific cast starts or stops. Now we use those GUIDs which restores the castbar to its appropriate behavior. (ticket #215)