Avoid duplicate dark nameplate scanning with BNP

This commit is contained in:
2026-09-02 22:37:03 +02:00
parent eb6f4b5fe2
commit 53477bf277
+16 -6
View File
@@ -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