Skip to content

Commit

Permalink
fix: check for PlayerFrameContainer only if we are on retail (doesnt …
Browse files Browse the repository at this point in the history
…exist on classic, cata ...) (#788)
  • Loading branch information
G1t-Happens authored Sep 11, 2024
1 parent 1ada11f commit ef02b36
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions BigDebuffs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2188,12 +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

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)
if WOW_PROJECT_ID == WOW_PROJECT_MAINLINE then
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
end
frame.icon:AddMaskTexture(frame.mask)
Expand Down

0 comments on commit ef02b36

Please sign in to comment.