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.
This removes the menu replacement code that is preventing errors when trying to focus someone or dismiss a pet through a right-click menu on an addon. There is a new API, UnitPopup_OpenMenu, that is a replacement for ShowMenu, but it's not a drop-in replacement, so until I have access to the beta or an 11.0.2 PTR there's not much I can do here.
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.
I neglected to test the new party-hide implementation on pre-10.0. It was not fully implemented. This implementation is from Pitbull4 and is more complicated than I need, but certainly does the job and allows for some future usage if needed.
Fixes wowace ticket #330
Exporting works pretty well, but importing is rough (mostly because error messaging isn't quite in place, and it's not obvious that you have to close the window to execute the import). I found a generic json serializer, decided to adapt it to WoW, and it seems to work.
But anyway, I saw this code sitting around and figured it wouldn't take too much work to get it in working order. I was mostly right.
Briefly fought a training dummy with a Death Knight and a Shaman. I'm sure stuff like Slice-and-dice will need attention for talents moving around and such.
Some menus, such as when targeting other players, use mixins which are themselves menus. We have to dive down one more layer to resolve those. The official UI source does this submenu thing (as opposed to recursion) so this should exactly mimic how the base game now works.
Since 9.2.5 completely re-worked UnitPopupMenus, IceHUD's "Set Focus" right-click menu option overrides were broken. This restores the override so that it can still suppress the tainted functionality.
Additionally, it turns out that having Clique installed replaces this entire thing somehow and makes Set Focus et al function (with IceHUD's ClickCastFrames registration). I don't know what that magic is about, but none of this munging happens and the tainted paths work fine. Interesting.
Fixes wowace ticket #319
I need to find a way to reintroduce this, but Blizzard's new method of building these frames doesn't look like it's going to be particularly easy. This stops error popups on 9.2.5
For some reason, on TBC classic target health is not updating frequently. I waded through the official TBC source code, and it looks like if predictedHealth is enabled (which it is by default), then the default UI uses an OnUpdate handler to update the target's health bar. So now I'm doing the same.
This has been tested on Classic PTR and Retail, but only with a Rogue
character. Don't have a ton of time to do more exhaustive tests right now.
Fixes#11
This has been tested on Classic with a Rogue up to level 5 using various modules and casually checked against a few level 1 classes. I'm sure there's a lot more to do here. I also made sure to test on Live.
Where possible I tried to check for API availability rather than specific client versions or program IDs. There are many cases where that's impractical, however, so version/program ID checks were used.
This was tested with:
* Ace3 @r1225
* AceGUI-3.0-SharedMediaWidgets @r61
* LibDBIcon-1.0 @v8.2.0
* LibDogTag-3.0 @v80200.1
* LibDogTag-Unit-3.0 @v80200.1-2-g93a898d-alpha
* LibRangeCheck-2.0 @v4.2.3 (with a couple of local changes)
* LibSharedMedia-3.0 @r113-alpha
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 isFirst is no longer passed to OnEnable, so we were never setting a debug frame.
Made the additional arguments that were being passed to Debug() actually do something (currently print out a stringified version of themselves in a space-delimited string)