Originally Posted by Caellian
What i'm trying is to replicate the exact same behavior as the default oUF threat module, but instead of coloring a texture, i want it to color that backdrop i'm creating around the frames.
I've changed to UnitDetailedThreatSituation(unit, 'target')
Seems to work a bit better but, say i send my pet in combat nothing happen, i have to engage the mob myself only then it start working correctly, and even after a feign death, then but only then the pet gets aggro colored.
Edit: well it seems that's also how the default oUF threat works, but that's weird.
Actually made it a lot simpler.
Code:
local function OverrideUpdateThreat(self, event, unit)
local status = UnitThreatSituation(unit)
if(status > 0) then
r, g, b = GetThreatStatusColor(status)
self.Threat:SetBackdropBorderColor(r, g, b)
self.Threat:Show()
else
self.Threat:Hide()
end
end
|
This is how I did it:
http://github.com/p3lim/ouf_mini/com...8cdf6157290a93
oUF required 'self.Threat' so instead I made my own