mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-24 00:26:55 +00:00
unitframes: update predictions on health change
This commit is contained in:
+3
-3
@@ -948,11 +948,11 @@ function pfUI.uf.OnUpdate()
|
||||
local unit = this.label .. this.id
|
||||
local heal = libpredict:UnitGetIncomingHeals(unit)
|
||||
local ress = libpredict:UnitHasIncomingResurrection(unit)
|
||||
local health, maxHealth = UnitHealth(unit), UnitHealthMax(unit)
|
||||
|
||||
if heal ~= this.lastheal then
|
||||
if heal - health - maxHealth ~= this.predictstate then
|
||||
local overhealperc = tonumber(this.config.overhealperc)
|
||||
local health, maxHealth = UnitHealth(unit), UnitHealthMax(unit)
|
||||
this.lastheal = heal
|
||||
this.predictstate = heal - health - maxHealth
|
||||
|
||||
if heal > 0 and (health < maxHealth or overhealperc > 0 ) then
|
||||
local width = this.config.width
|
||||
|
||||
Reference in New Issue
Block a user