Default nameplates customizations
Ellypse opened this issue ยท 2 comments
Since patch 7.3 is bringing a native "name only" mode for default friendly nameplates, it is time for Total RP 3 to customize the default nameplates.
The customizations we would want :
- Replace character name with custom RP names
- Replace class color with custom class color
- Opt in option to show player icon in front of the name
- Opt in option to show at-first-glance slots on nameplates
- All those things should work on player nameplates and companion nameplates (hunter, warlock pets, since battle pets doesn't get nameplates)
- For player, opt on option to also show the name of the mount below the player, with all the additional features mentioned avives.
I'm looking at the API on my phone here so I'm probably missing a few extra logical steps...
Blizzard_Nameplates internally uses a CompactUnitFrame for most of the actual display.
Hook into CompactUnitFrame_UpdateName
and CompactUnitFrame_UpdateHealthColor
and apply changes only it's a nameplate (quite a few ways to do this I'd suspect). This gets you items one and two.
There's a few areas in Blizzard_Nameplates we can hook to add the actual icon and glances to the frame, best might be NamePlateDriverMixin.OnNamePlateCreated
. This shouldn't get called for the protected frames used in dungeons and the like.
Hooking the name update alone should* work fine as a starting point to trigger a glance and icon update. Might need a few extra hooks but we'll see.
My guess is that gets you 90% of the list. The last point might be a pain, haven't looked at our code enough to see how it determines what companion profiles to display on tooltips yet.
I started working on this a while ago on the feature/nameplates branch. I'm not sure my approach is the right one, I had some trouble resetting the nameplates when used for something else than a player.