Skip to content

Commit

Permalink
remove barAnimation == "Flash" check
Browse files Browse the repository at this point in the history
  • Loading branch information
Krealle committed Aug 29, 2024
1 parent 33357e1 commit 4e43793
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions Widgets/Bars/HealthBar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,7 @@ local function UpdateHealth(button)
UpdateUnitHealthState(button)
local healthPercent = button.states.healthPercent

if CellDB["appearance"]["barAnimation"] == "Flash" then
button.widgets.healthBar:SetValue(button.states.health)
local diff = healthPercent - (button.states.healthPercentOld or healthPercent)
if diff >= 0 or button.states.healthMax == 0 then
B:HideFlash(button)
elseif diff <= -0.05 and diff >= -1 then --! player (just joined) UnitHealthMax(unit) may be 1 ====> diff == -maxHealth
B:ShowFlash(button, abs(diff))
end
else
button.widgets.healthBar:SetValue(button.states.health)
end
button.widgets.healthBar:SetValue(button.states.health)

if Cell.vars.useGradientColor or Cell.vars.useFullColor then
U:UnitFrame_UpdateHealthColor(button)
Expand Down

0 comments on commit 4e43793

Please sign in to comment.