From 53477bf277a47cdcbd1dbaec9519f294ea5a6d4c Mon Sep 17 00:00:00 2001 From: Dusk-92 Date: Wed, 2 Sep 2026 22:37:03 +0200 Subject: [PATCH] Avoid duplicate dark nameplate scanning with BNP --- mods/dark-ui-elements.lua | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/mods/dark-ui-elements.lua b/mods/dark-ui-elements.lua index 15aa064..9feb354 100644 --- a/mods/dark-ui-elements.lua +++ b/mods/dark-ui-elements.lua @@ -314,10 +314,20 @@ module.enable = function(self) DarkenFrame(_G["GameTooltipStatusBarBackdrop"]) end) - table.insert(ShaguTweaks.libnameplate.OnUpdate, function() - if not this.darkened then - this.darkened = true - DarkenFrame(this) - end - end) + -- BlizzNameplatesPlus v1.0.8 already re-applies ShaguTweaks dark mode + -- through its own nameplate library. In that exact known-compatible version, + -- do not register a second ShaguTweaks nameplate scanner callback. + local bnpOwnsDarkNameplates = BNP + and BNP.version == "1.0.8" + and BNP.libnameplate + and BNP.shaguCompat + + if not bnpOwnsDarkNameplates then + table.insert(ShaguTweaks.libnameplate.OnUpdate, function() + if not this.darkened then + this.darkened = true + DarkenFrame(this) + end + end) + end end