unitframes: show buff indicator timers below 100s

This commit is contained in:
shagu
2020-04-13 14:06:20 +02:00
parent 8f2b690610
commit e0f5f111c0
+2 -2
View File
@@ -1690,7 +1690,7 @@ function pfUI.uf:ClickAction(button)
end
function pfUI.uf:AddIcon(frame, pos, icon, timeleft)
local iconsize = C.unitframes.indicator_size
local iconsize = tonumber(C.unitframes.indicator_size)
if not frame.hp then return end
local frame = frame.hp.bar
if pos > 6 or pos > ceil(frame:GetWidth() / iconsize) then return end
@@ -1714,7 +1714,7 @@ function pfUI.uf:AddIcon(frame, pos, icon, timeleft)
end
end
frame.icon[pos].tex:SetTexture(icon)
CooldownFrame_SetTimer(frame.icon[pos].cd, GetTime(), (timeleft or 0), 1)
CooldownFrame_SetTimer(frame.icon[pos].cd, GetTime(), (timeleft and timeleft < 100 and iconsize > 9 and timeleft or 0), 1)
pfUI.api.CreateBackdrop(frame.icon[pos], nil, true)
frame.icon[pos]:Show()
end