Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

healthprediction: Remove unnecessary hack #669

Merged
merged 1 commit into from
Jan 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions elements/healthprediction.lua
Original file line number Diff line number Diff line change
Expand Up @@ -138,29 +138,25 @@ local function Update(self, event, unit)
end

if(element.myBar) then
-- BUG: As of 10.2, when the current value matches the min value the status bar texture
-- despite not being visible is actually set to the max which is the opposite of what we
-- want, and it breaks all the anchors on top of that. Setting the min value slightly below
-- 0 allows us to imitate the original pre-10.2 behaviour.
element.myBar:SetMinMaxValues(-0.001, maxHealth)
element.myBar:SetMinMaxValues(0, maxHealth)
element.myBar:SetValue(myIncomingHeal)
element.myBar:Show()
end

if(element.otherBar) then
element.otherBar:SetMinMaxValues(-0.001, maxHealth)
element.otherBar:SetMinMaxValues(0, maxHealth)
element.otherBar:SetValue(otherIncomingHeal)
element.otherBar:Show()
end

if(element.absorbBar) then
element.absorbBar:SetMinMaxValues(-0.001, maxHealth)
element.absorbBar:SetMinMaxValues(0, maxHealth)
element.absorbBar:SetValue(absorb)
element.absorbBar:Show()
end

if(element.healAbsorbBar) then
element.healAbsorbBar:SetMinMaxValues(-0.001, maxHealth)
element.healAbsorbBar:SetMinMaxValues(0, maxHealth)
element.healAbsorbBar:SetValue(healAbsorb)
element.healAbsorbBar:Show()
end
Expand Down