View Single Post
04-28-16, 05:59 PM   #1
sezz
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 158
Question Blizzard_NamePlates customization/performance

I'm sure some of you already customized the new nameplates, just curious how everyone's doing it.

I've hooked:

1. DefaultCompactNamePlateFrameSetupInternal for all my modifications (textures, an additional icon for elite mobs, level text and changing positions/size)
2. NamePlateDriverFrame.UpdateNamePlateOptions for correcting castbar spell icon size and castbar height (this sucks, because all nameplates are updated twice, but replacing the function (instead of hooking it) doesn't change performance at all)

And I also replaced frame.nameChangedCallback with a custom function to set level and show/hide the elite indicator and call the original callback afterwards.

Everything is working fine but I when there's a large amount of namplates on the screen and I move the camera (this doesn't happen when I'm not moving it) the FPS drop from 100 to ~30. Without any modifications they drop to ~40. (I tested this in ICC - when you go to Professor Putricide a massive amount of cockroaches spawn, but it can also be tested in Gundrak right before the first boss or everywhere else where 30 nameplates can be shown at the same time, because that's the cap).

Instead of hooking DefaultCompactNamePlateFrameSetupInternal and replacing NamePlateDriverFrame.UpdateNamePlateOptions I also tried to replace the objects SetSize/Setpoint/etc. with a dummy function - that doesn't seem to impact the performance at all, it only makes the "Larger Nameplates" option unusable.

I can post the code if anyone is interested, but most of it is just replacing textures and moving stuff around, I'm more interested if it's just me having those issues (because I hooked the wrong functions), or if it's currently a common problem with Blizzard's new nameplates.