Skip to content

Commit

Permalink
fix custom portraits on npcs
Browse files Browse the repository at this point in the history
  • Loading branch information
eltreum0 committed Nov 21, 2024
1 parent ca2129e commit 50b31ac
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions ElvUI_EltreumUI/Modules/Skins/Unitframes/PortraitSkin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ local function CreatePorfraitFrameAndTexture(frame,name,invert,update,db,Setting
end

if E.db.ElvUI_EltreumUI.unitframes.portrait[db].custom and E.db.ElvUI_EltreumUI.unitframes.portrait[db].style ~= "ORIGINAL" and E.db.ElvUI_EltreumUI.unitframes.portrait[db].customcircle and E.db.ElvUI_EltreumUI.unitframes.portrait[db].background then
frame.EltruismPortrait.background:SetVertexColor(E.db.ElvUI_EltreumUI.unitframes.portrait[db].backgroundcolor.r,E.db.ElvUI_EltreumUI.unitframes.portrait[db].backgroundcolor.g,E.db.ElvUI_EltreumUI.unitframes.portrait[db].backgroundcolor.b,1)
if UnitIsPlayer(frame.unit) or (E.Retail and UnitInPartyIsAI(frame.unit)) then
frame.EltruismPortrait.background:SetVertexColor(E.db.ElvUI_EltreumUI.unitframes.portrait[db].backgroundcolor.r,E.db.ElvUI_EltreumUI.unitframes.portrait[db].backgroundcolor.g,E.db.ElvUI_EltreumUI.unitframes.portrait[db].backgroundcolor.b,1)
end
else
frame.EltruismPortrait.background:SetVertexColor(1,0,0,0)
end
Expand All @@ -139,6 +141,14 @@ local function CreatePorfraitFrameAndTexture(frame,name,invert,update,db,Setting
end
end

if E.db.ElvUI_EltreumUI.unitframes.portrait[db].customcircle and E.db.ElvUI_EltreumUI.unitframes.portrait[db].custom then
if not (UnitIsPlayer(frame.unit) or (E.Retail and UnitInPartyIsAI(frame.unit))) then
frame.EltruismPortrait.portrait:Hide()
frame.EltruismPortrait.border:Hide()
frame.EltruismPortrait.background:SetVertexColor(1,0,0,0)
end
end

--color
if not E.db.ElvUI_EltreumUI.unitframes.portrait[db].customcolor then
if UnitIsPlayer(frame.unit) or (E.Retail and UnitInPartyIsAI(frame.unit)) then
Expand Down Expand Up @@ -255,7 +265,9 @@ local function CreatePorfraitFrameAndTexture(frame,name,invert,update,db,Setting
end

if E.db.ElvUI_EltreumUI.unitframes.portrait[db].customcircle then
frame.EltruismPortrait.border:Show()
if UnitIsPlayer(frame.unit) or (E.Retail and UnitInPartyIsAI(frame.unit)) then
frame.EltruismPortrait.border:Show()
end
frame.EltruismPortrait.portrait:AddMaskTexture(frame.EltruismPortrait.Mask)
else
frame.EltruismPortrait.portrait:SetMask("")
Expand Down

0 comments on commit 50b31ac

Please sign in to comment.