Skip to content

Commit

Permalink
Merge branch 'main' into ptr
Browse files Browse the repository at this point in the history
  • Loading branch information
kodewdle committed Oct 30, 2024
2 parents ee647ee + a6a9752 commit 3f003b1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
1 change: 1 addition & 0 deletions ElvUI/Core/Defaults/Profile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1764,6 +1764,7 @@ P.unitframe = {
high = 0.75,
low = 0.3,
onlyLow = false,
colorBackdrop = false,
good = { r = 0, g = 1, b = 0 },
neutral = { r = 1, g = 1, b = 0 },
bad = { r = 1, g = 0, b = 0 },
Expand Down
8 changes: 7 additions & 1 deletion ElvUI/Core/Modules/UnitFrames/Elements/Health.lua
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ function UF:PostUpdateHealthColor(unit, r, g, b)
end
end

local newr, newg, newb
local newr, newg, newb, healthbreakBackdrop
if not color then -- dont need to process this when its hostile
if not parent.db or parent.db.colorOverride ~= 'ALWAYS' then
if ((colors.healthclass and colors.colorhealthbyvalue) or (colors.colorhealthbyvalue and parent.isForced)) and not isTapped then
Expand All @@ -284,6 +284,10 @@ function UF:PostUpdateHealthColor(unit, r, g, b)
elseif breakPoint >= healthBreak.low and breakPoint < healthBreak.high and not onlyLow then
color = colors.healthBreak.neutral
end

if color and healthBreak.colorBackdrop then
healthbreakBackdrop = true
end
end
end
end
Expand All @@ -300,6 +304,8 @@ function UF:PostUpdateHealthColor(unit, r, g, b)
if colors.useDeadBackdrop and isDeadOrGhost then
bgc = colors.health_backdrop_dead
mult = 1 -- custom backdrop (dead)
elseif healthbreakBackdrop then
bgc = color
elseif colors.healthbackdropbyvalue then
if colors.customhealthbackdrop then
newr, newg, newb = ElvUF:ColorGradient(self.cur, self.max, 1, 0, 0, 1, 1, 0, colors.health_backdrop.r, colors.health_backdrop.g, colors.health_backdrop.b)
Expand Down
1 change: 1 addition & 0 deletions ElvUI/Mainline/Filters/Filters.lua
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ G.unitframe.aurafilters.Blacklist = {
[348443] = List(), -- Experience Eliminated
[374037] = List(), -- Overwhelming Rage
[374609] = List(), -- Blood Draw
[382912] = List(), -- Well-Honed Instincts
[383600] = List(), -- Surrounding Storm (Strunraan)
[390106] = List(), -- Riding Along
[390435] = List(), -- Exhaustion (Evoker lust debuff)
Expand Down
8 changes: 5 additions & 3 deletions ElvUI_Options/Core/UnitFrames.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1171,9 +1171,11 @@ Colors.healthGroup.args.healthBreak.args.enabled = ACH:Toggle(L["Enable"], nil,
Colors.healthGroup.args.healthBreak.args.high = ACH:Range(L["High"], nil, 2, { min = 0.5, max = 1, step = 0.01, isPercent = true })
Colors.healthGroup.args.healthBreak.args.low = ACH:Range(L["Low"], nil, 3, { min = 0, max = 0.5, step = 0.01, isPercent = true })
Colors.healthGroup.args.healthBreak.args.onlyLow = ACH:Toggle(L["Only Low"], nil, 4)
Colors.healthGroup.args.healthBreak.args.good = ACH:Color(L["Good"], nil, 5)
Colors.healthGroup.args.healthBreak.args.neutral = ACH:Color(L["Neutral"], nil, 6)
Colors.healthGroup.args.healthBreak.args.bad = ACH:Color(L["Bad"], nil, 7)
Colors.healthGroup.args.healthBreak.args.colorBackdrop = ACH:Toggle(L["Color Backdrop"], nil, 5)
Colors.healthGroup.args.healthBreak.args.spacer = ACH:Spacer(6, 'full')
Colors.healthGroup.args.healthBreak.args.good = ACH:Color(L["Good"], nil, 7)
Colors.healthGroup.args.healthBreak.args.neutral = ACH:Color(L["Neutral"], nil, 8)
Colors.healthGroup.args.healthBreak.args.bad = ACH:Color(L["Bad"], nil, 9)

Colors.powerGroup = ACH:Group(L["Power"], nil, nil, nil, function(info) return E.db.unitframe.colors[info[#info]] end, function(info, value) E.db.unitframe.colors[info[#info]] = value UF:Update_AllFrames() end)
Colors.powerGroup.args.transparentPower = ACH:Toggle(L["Transparent"], L["Make textures transparent."], 1)
Expand Down

0 comments on commit 3f003b1

Please sign in to comment.