They dun have anything like that as far as I remember, cuz nameplates are implemented in C/C++, not in LUA.
First, you have to "catch" a nameplate frame among all the frames on the screen. You have to hook WorldFrames OnUpdate script, my hook function looks like this:
Code:
local prevNumChildren = 0
local function WorldFrame_OnUpdate(self, elapsed)
self.elapsed = (self.elapsed or 0) + elapsed
if self.elapsed > 0.1 then
local curNumChildren = WorldFrame:GetNumChildren()
if curNumChildren ~= prevNumChildren then
for i = prevNumChildren + 1, curNumChildren do
local f = select(i, WorldFrame:GetChildren())
local name = f:GetName()
if (name and match(name, "^NamePlate%d")) and not NP.plates[f] then -- I also have a table of all handled nameplates
HandleNamePlate(f) -- that's my function I use to customise templates
end
end
prevNumChildren = curNumChildren
end
-- more code here
self.elapsed = 0
end
end
Then inside my HandleNamePlate function I get frame's children and regions:
Code:
local function HandleNamePlate(self)
self.barFrame, self.nameFrame = self:GetChildren() -- textures and name
self.health, self.cast = self.barFrame:GetChildren() -- health bar and cast bar
self.threat, self.border, self.highlight, self.level, self.bossIcon, self.raidIcon, self.eliteIcon = self.barFrame:GetRegions()
self.name = self.nameFrame:GetRegions()
self.health.texture = self.health:GetRegions()
self.cast.texture, self.cast.border, self.cast.shield, self.cast.icon, self.cast.text, self.cast.textShadow = self.cast:GetRegions()
-- more code here
end
Not optimised code though, I consider rewriting it, cuz too many table lookups occur later on.