View Single Post
02-16-13, 05:35 PM   #1
Spyro
A Fallenroot Satyr
 
Spyro's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2011
Posts: 23
Question Nameplate threat texture

Hi guyz.

I want to show and change the color of the Threat Region of nameplates, that texture that glows with aggro changes etc.

Once I have intercepted the nameplate, I get the Threat Region and then I do a SetVertexColor(0, 1, 0, 1) on it and a Show() to show it in green, but when I do it, nothing happens, the texture doesn't appears. I'm sure I get the region correctly (I saw it on LibNameplate's source code). I also get other regions correctly (name, level, etc).

This is basically what I do

Lua Code:
  1. local function GetThreatRegion(Plate)
  2.   return select(1, (Plate:GetChildren()):GetRegions())
  3. end
  4.  
  5. TheNameplate:SetScript("OnShow", function(Plate)
  6.   GetThreatRegion(Plate):SetVertexColor(0, 1, 0, 1)
  7.   GetThreatRegion(Plate):Show()
  8. )

Anybody that has worked with nameplates knows why?
  Reply With Quote