Thread: Stuf + Threat
View Single Post
Unread 08-13-11, 05:37 PM   #41
Nibelheim
local roygbi-
 
Nibelheim's Avatar
Featured
Join Date: Jan 2010
Posts: 1,548
Or for threat colored text.

Code:
function(unit)
    local _, _, threatpct, _, threatvalue = UnitDetailedThreatSituation(unit, "target")
    local color = status and {GetThreatStatusColor(status)} or {GetThreatStatusColor(0)}
    if threatvalue then
        return "|cff%02x%02x%02x%d|r", color[1], color[2], color[3], floor(threatpct)
    else
        return ""
    end
end
Nibelheim is offline   Reply With Quote