View Single Post
03-01-09, 07:44 AM   #833
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
Join Date: May 2006
Posts: 281
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
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }

Last edited by Caellian : 03-01-09 at 09:39 AM.