Quantcast WoWInterface - View Single Post - Nameplate hacking and unit IDs
View Single Post
05-17-16, 06:38 AM   #14
jeruku
A Cobalt Mageweaver
 
jeruku's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 214
Originally Posted by lieandswell View Post
Just to be clear for anyone else following along: Blizzard_NamePlates re-uses a lot of the code from raid frames (CompactUnitFrame), but without the click-ableness. It attaches things it calla "UnitFrames" to the NamePlate# frames returned by C_NamePlate.GetNamePlateForUnit(namePlateUnitToken) but then disables mouse interaction so all clicks go to NamePlate#.
On a side note, the nameplate frame table itself has a key for the UnitFrame. The UnitFrame is a CompactUnitFrame which has all the bars, text, and frames attached.

Lua Code:
  1. -- for example
  2. nameplate.UnitFrame
  3. nameplate.UnitFrame.unit
  4. nameplate.UnitFrame.healthBar
  5. nameplate.UnitFrame.BuffFrame
__________________
"I have not failed, I simply found 10,000 ways that did not work." - Thomas Edison