Originally Posted by Lily.Petal
Is there anyway I can change the background color of a frame to show if that party member has aggro or not?
I can't seem to find any leads :<
|
-- OnLoad
Code:
self:RegisterEvent("UNIT_THREAT_SITUATION_UPDATE")
or
-- OnEvent
Code:
-- Replace unit with "party1" to "party4" for party members. Or ("target", "targettarget") for seeing threat on your target.
local status = UnitThreatSituation(unit, "target")
local r, g, b = GetThreatStatusColor(status)
self.bg:SetVertexColor(r, g, b)
UnitThreatSituation API
Hmm, may need a "UNIT_TARGET" event registered in OnLoad.