If a CD bar was tracking a spell that was currently unknown to the player (such as the not-currently-active variations of Wildfire Bomb for Survival Hunters after first login/UI reload) then the placeholder frost icon would show up instead. The icon was only meant to be used to aid in configuration mode, so now the icon is set to the placeholder icon when config mode is enabled only. Technically we should clear the icon if it's set to the default whenever config mode is exited, but I figure config mode is pretty rare and should be okay for now.
It's still, at it's core, a guess because Blizzard doesn't offer the necessary events to make a reliable decision, so it tends to be wrong semi-frequently in a chain-casting scenario. But it's better than it was.
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.
All the spellcasting event callbacks need their signatures changed, but I can't cleanly do that without breaking Legion compatibility. So that will have to wait, I think. Castbars seem to be working for now...
The simplest solution is probably to register different callbacks for BfA versus pre-BfA, but that seems ugly.
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.
Apparently internally Insanity is multiplied by 100 from the value that's actually displayed on the ui (so the internal max for my test character is 10500 while the displayed amount is 105).