I want to color some of my textures in threat color.
Has anyone a running threat code to spare.
Not sure if tags can help me much since I need to adjust the VertexColor of textures based on given threat.
What I used in oUF 1.3.x was
function
Code:
-- check threat
local function check_threat(self,event,unit)
if unit then
if self.unit ~= unit then
return
end
local threat = UnitThreatSituation(unit)
if threat == 3 then
self.Portrait_glosst:SetVertexColor(1,0,0)
elseif threat == 2 then
self.Portrait_glosst:SetVertexColor(1,0.6,0)
else
self.Portrait_glosst:SetVertexColor(0.37,0.3,0.3)
end
end
end
call
Code:
self:RegisterEvent("UNIT_THREAT_SITUATION_UPDATE", check_threat)
Is this still the way to go or are there any other options?