Originally Posted by p3lim
Basically, Blizzard's "player nameplate" is not a nameplate in reality, it's a normal player unitframe made to look like a nameplate.
|
You're soooo wrong
It's a nameplate that's made to look like a unitframe. The moment it's added, power bar, class power and other elements are attached to it. The moment it's removed, all these additional elements are removed too.
When a new nameplate is added,
NamePlateDriverMixin:OnNamePlateAdded is called. If nameplate's unit is "player", these two funcs will add all player specific components:
-
DefaultCompactNamePlatePlayerFrameSetup sets up castbar, power bar, etc;
-
NamePlateDriverMixin.SetupClassNameplateBars adds class power bars.
That's basically what people need to replicate via callbacks. They need to add player-specific components on "NAME_PLATE_UNIT_ADDED", and clean up stuff on "NAME_PLATE_UNIT_REMOVED".