nameplates: always update non-target transparency

This commit is contained in:
shagu
2020-05-22 11:34:21 +02:00
parent 9bb9645ee0
commit fe6034e91c
+8 -7
View File
@@ -443,13 +443,6 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
-- always make sure to keep plate visible
plate:Show()
-- set plate alpha
if target then
plate:SetAlpha(1)
else
plate:SetAlpha(tonumber(C.nameplates.notargalpha))
end
if target and C.nameplates.targetglow == "1" then
plate.glow:Show() else plate.glow:Hide()
end
@@ -573,6 +566,14 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
local target = UnitExists("target") and frame:GetAlpha() == 1 or nil
local mouseover = UnitExists("mouseover") and original.glow:IsShown() or nil
-- set non-target plate alpha
if target then
nameplate:SetAlpha(1)
else
frame:SetAlpha(.95)
nameplate:SetAlpha(tonumber(C.nameplates.notargalpha))
end
-- use timer based updates
if not nameplate.tick or nameplate.tick < GetTime() then
nameplate.tick = GetTime() + .2