Allright so, here's a small threat function, working just fine but not exactly the way i want it to work.
Code:
caelPanels.UNIT_THREAT_SITUATION_UPDATE = function(self)
local status = UnitThreatSituation("player", "target")
for i = 1, 7 do
local panel = panels[i]
if panel then
if (status and status > 0) then
local r, g, b = GetThreatStatusColor(status)
panel:SetBackdropBorderColor(r, g, b)
else
panel:SetBackdropBorderColor(0, 0, 0)
end
end
end
end
As you can see local status = UnitThreatSituation("player", "target")
It will only show my threat toward my current target, but my goal was to have it change color if i have aggro from any mob, not just my target, let's take a quick example, i target a mob in a pack of 10 and start using Volley, and get aggro from one of the mob but not the one i'm targetting...
I've tried to do local status = UnitThreatSituation("player", unit) but that doesn't seems to work.
Any idea ?