Skip to content

Commit

Permalink
[Bugfix] Fix abs:healabs:merge tags showing 0 values
Browse files Browse the repository at this point in the history
  • Loading branch information
Krealle committed Dec 17, 2024
1 parent eec65df commit ab5a625
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Widgets/Texts/CustomFormats.lua
Original file line number Diff line number Diff line change
Expand Up @@ -600,12 +600,16 @@ end, "Health", "90%")
W:AddTag("abs:healabs:merge", "UNIT_HEAL_ABSORB_AMOUNT_CHANGED UNIT_ABSORB_AMOUNT_CHANGED", function(unit)
local totalHealAbsorbs = UnitGetTotalHealAbsorbs(unit)
local totalAbsorbs = UnitGetTotalAbsorbs(unit)
return FormatText(totalAbsorbs - totalHealAbsorbs)
local tot = totalAbsorbs - totalHealAbsorbs
if tot == 0 then return end
return FormatText(tot)
end, "Health", "40000")
W:AddTag("abs:healabs:merge:short", "UNIT_HEAL_ABSORB_AMOUNT_CHANGED UNIT_ABSORB_AMOUNT_CHANGED", function(unit)
local totalHealAbsorbs = UnitGetTotalHealAbsorbs(unit)
local totalAbsorbs = UnitGetTotalAbsorbs(unit)
return FormatText(totalAbsorbs - totalHealAbsorbs, nil, false, true)
local tot = totalAbsorbs - totalHealAbsorbs
if tot == 0 then return end
return FormatText(tot, nil, false, true)
end, "Health", "-40k")

-- MARK: Heal Absorbs
Expand Down

0 comments on commit ab5a625

Please sign in to comment.