Avoid duplicate dark nameplate scanning with BNP
This commit is contained in:
@@ -314,10 +314,20 @@ module.enable = function(self)
|
|||||||
DarkenFrame(_G["GameTooltipStatusBarBackdrop"])
|
DarkenFrame(_G["GameTooltipStatusBarBackdrop"])
|
||||||
end)
|
end)
|
||||||
|
|
||||||
table.insert(ShaguTweaks.libnameplate.OnUpdate, function()
|
-- BlizzNameplatesPlus v1.0.8 already re-applies ShaguTweaks dark mode
|
||||||
if not this.darkened then
|
-- through its own nameplate library. In that exact known-compatible version,
|
||||||
this.darkened = true
|
-- do not register a second ShaguTweaks nameplate scanner callback.
|
||||||
DarkenFrame(this)
|
local bnpOwnsDarkNameplates = BNP
|
||||||
end
|
and BNP.version == "1.0.8"
|
||||||
end)
|
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
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user