Quantcast WoWInterface - View Single Post - Nameplate FPS drop research
View Single Post
06-29-13, 04:25 AM   #8
A Pyroguard Emberseer
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,680
No actually it is exactly what I was looking for, a fix for my fps issues.

Another important point:
  • Do not reparent anything from the Blizzard nameplate to the new nameplate. It will catch you a taint.

Sth that you can add is:
Lua Code:
  1. plate.barFrame, plate.nameFrame = plate:GetChildren()
  2. plate.barFrame:Hide()
  3. plate.nameFrame:Hide()

This will hide every child of the Blizzard nameplate. So the only frames that will live are the ones on your newly created frame.

Seems like reparenting some frames is possible. This worked without issues:
Lua Code:
  1. plate.nameFrame:SetParent(Nameplates[plate])

Here are some other hooks that might come in handy later:
Lua Code:
  1. plate:HookScript("OnShow", NamePlateOnShow)
  2. plate.castbar:HookScript("OnShow", CastbarOnShow)
  3. plate.castbar:HookScript("OnHide", CastbarOnHide)
  4. plate.healthbar:HookScript("OnValueChanged", HealthbarOnValueChanged)
  5. plate.castbar:HookScript("OnValueChanged", CastbarOnValueChanged)

If there is no script yet set change HookScript to SetScript.

So we could only change our castbar values if there is an actual change involved and not on every frame drawn.
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW) | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 06-29-13 at 05:50 AM.
  Reply With Quote