0
@@ -92,7 +92,7 @@ function ControlFreak:Enable()
0
self:RegisterMessage("DONGLE_PROFILE_DELETED", "ProfileDeleted")
0
lego = ControlFreakFrame
0
- lego:SetText(
"Controlled (000s)")
0
+ lego:SetText(
self.db.char.compactmode and "000s" or "Controlled (000s)")
0
lego:SetDB(self.db.char.frameopts)
0
@@ -235,6 +235,7 @@ function ControlFreak:StopTimer()
0
+local shortnotes = {["Control Freak"] = "CF", Invalid = "Inv", Controlled = "Ctr", Damage = "Dmg", Loose = "L", Ready = "Rdy", Dead = "D"}
0
function ControlFreak:OnUpdate(elapsed)
0
local self = ControlFreak
0
self.elapsed = self.elapsed or 0
0
@@ -250,14 +251,14 @@ function ControlFreak:OnUpdate(elapsed)
0
if hp and hp ~= lasthp then lasthp, lasthptime = hp, GetTime() end
0
local alpha, color, note, range, unittag = self.db.char.alpha, "default", "Control Freak", "", ""
0
if focusisenemy and not focusdead then unit = "focus" end
0
if not isvalid[unit] then color, note, tiptext = "grey", "Invalid"
0
for debuff in pairs(mydebuffs) do if IsSpellInRange(debuff, unit) == 0 then range = "*" end end
0
if controlled[unit] then
0
-
local _, _, _, _, _, _, timeLeft = UnitDebuff(unit, controlled[unit])
0
+
timeLeft = select(7, UnitDebuff(unit, controlled[unit]))
0
color, note = "cyan", timeLeft and string.format("Controlled (%ds)", timeLeft) or "Controlled"
0
if timeLeft and timeLeft <= self.db.char.breakthreshold then alpha = 1.0 end
0
elseif lasthptime and lasthptime >= (GetTime()-damageinterval) then alpha, color, note = 1.0, "red", "Damage"
0
@@ -283,6 +284,7 @@ function ControlFreak:OnUpdate(elapsed)
0
lego:SetBackdropBorderColor(unpack(colors[color]))
0
+ if self.db.char.compactmode then note = timeLeft and string.format("%ds", timeLeft) or shortnotes[note] end
0
lego:SetText(string.concat(colors[color].t, range, note, range))
0
if focusdead and not wasfocusdead then self:PLAYER_FOCUS_CHANGED() end
Comments
No one has commented yet.