View Single Post
06-06-17, 11:54 PM   #4
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
Originally Posted by p3lim View Post
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".
__________________

Last edited by lightspark : 06-07-17 at 12:34 AM.
  Reply With Quote