From 0e428de74c087cc09adfb8dfcf601e5fdd7179ae Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Sun, 25 Oct 2026 19:53:30 -0500 Subject: [PATCH] Fix inactive nameplate alpha capped at 99% CacheConfig clamped notargalpha to 0.99, so a 100% setting never reached full opacity. Clamp to 1.0 instead and detect the target plate by GUID comparison only, removing the alpha-based fallback that required the headroom. --- modules/nameplates.lua | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/nameplates.lua b/modules/nameplates.lua index 37d466f9..110b1cdb 100644 --- a/modules/nameplates.lua +++ b/modules/nameplates.lua @@ -130,8 +130,8 @@ pfUI:RegisterModule("nameplates", function () cfg.targetcastbar = C.nameplates["targetcastbar"] == "1" cfg.notargalpha = tonumber(C.nameplates.notargalpha) or 0.5 if cfg.notargalpha > 1 then cfg.notargalpha = cfg.notargalpha / 100 end - -- Clamp to 0.99 so non-target plates never reach 1.0 (used for target detection) - if cfg.notargalpha > 0.99 then cfg.notargalpha = 0.99 end + -- Clamp to 1.0 so a 100% setting yields full opacity (target detection is GUID-based) + if cfg.notargalpha > 1 then cfg.notargalpha = 1 end cfg.namefightcolor = C.nameplates.namefightcolor == "1" cfg.spellname = C.nameplates.spellname == "1" cfg.showhp = C.nameplates.showhp == "1" @@ -1445,11 +1445,10 @@ nameplates:RegisterUnitEvent("UNIT_SPELLCAST_NOT_INTERRUPTIBLE", "target", "focu if not hasEventUpdate and (nameplate.lasttick or 0) + cfg.throttle_min > now then return end -- PERF: Intelligent throttling based on target/castbar status and plate count - -- Use GUID comparison as primary target detection: instant, immune to alpha transitions, + -- Use GUID comparison for target detection: instant, immune to alpha transitions, -- and immediately correct on de-target (unlike istarget which updates one tick later) local targetGuid = state and state.targetGuid - local target = (targetGuid and nameplate.cachedGuid and targetGuid == nameplate.cachedGuid) or - (state and state.targetGuid and frame:GetAlpha() >= 0.99) or nil + local target = (targetGuid and nameplate.cachedGuid and targetGuid == nameplate.cachedGuid) or nil -- Target plate castbar runs on its own dedicated frame (nameplates.castbarFrame). -- For non-target plates with castbar active, use castbar throttle to ensure -- smooth animation without overloading the central loop. @@ -1967,4 +1966,4 @@ nameplates:RegisterUnitEvent("UNIT_SPELLCAST_NOT_INTERRUPTIBLE", "target", "focu end) pfUI.nameplates = nameplates -end) \ No newline at end of file +end)