From 3eeb48f497488cb687789434b8a782abede042b2 Mon Sep 17 00:00:00 2001 From: G1t-Happens <44774729+G1t-Happens@users.noreply.github.com> Date: Mon, 9 Sep 2024 21:39:13 +0200 Subject: [PATCH] Set the atlas only if the new frame textures are actually present - compatibility adjustment (#785) * fix: set the atlas only if the new frame textures are actually present * format --- BigDebuffs.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/BigDebuffs.lua b/BigDebuffs.lua index 45eab4b..e2a3438 100644 --- a/BigDebuffs.lua +++ b/BigDebuffs.lua @@ -2188,7 +2188,13 @@ function BigDebuffs:UNIT_AURA(unit) frame.mask:SetAllPoints(frame.icon) frame.mask:SetTexture("Interface/CHARACTERFRAME/TempPortraitAlphaMask", "CLAMPTOBLACKADDITIVE", "CLAMPTOBLACKADDITIVE") if frame.unit == "player" then - frame.mask:SetAtlas("UI-HUD-UnitFrame-Player-Portrait-Mask", _G.TextureKitConstants.UseAtlasSize) + + local container = PlayerFrame.PlayerFrameContainer + -- set the frame.mask atlas only if the new frame textures are actually present (4642466) + if (container.AlternatePowerFrameTexture and container.AlternatePowerFrameTexture:GetTexture() == 4642466) + or (container.FrameTexture and container.FrameTexture:GetTexture() == 4642466) then + frame.mask:SetAtlas("UI-HUD-UnitFrame-Player-Portrait-Mask", _G.TextureKitConstants.UseAtlasSize) + end end frame.icon:AddMaskTexture(frame.mask) end