mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-23 08:06:55 +00:00
unitframes: fix invert healthbar values
This commit is contained in:
@@ -304,6 +304,11 @@ function pfUI.uf:CreateUnitFrame(unit, id, config, tick)
|
||||
-- instant refresh on unit change (e.g. target)
|
||||
this.cache.hp = UnitHealth(this.label .. this.id)
|
||||
this.cache.hpmax = UnitHealthMax(this.label .. this.id)
|
||||
|
||||
if this.config.invert_healthbar == "1" then
|
||||
this.cache.hp = this.cache.hpmax - this.cache.hp
|
||||
end
|
||||
|
||||
this.cache.hpdisplay = this.cache.hp
|
||||
this.hp.bar:SetMinMaxValues(0, this.cache.hpmax)
|
||||
this.hp.bar:SetValue(this.cache.hp)
|
||||
|
||||
Reference in New Issue
Block a user