Skip to content

Commit

Permalink
Set the atlas only if the new frame textures are actually present - c…
Browse files Browse the repository at this point in the history
…ompatibility adjustment (#785)

* fix: set the atlas only if the new frame textures are actually present

* format
  • Loading branch information
G1t-Happens authored Sep 9, 2024
1 parent baf0ba5 commit 3eeb48f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion BigDebuffs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3eeb48f

Please sign in to comment.