mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-22 15:46:56 +00:00
unitframes: never abort range checks without cache
This commit is contained in:
+3
-3
@@ -270,9 +270,6 @@ function pfUI.uf:CreateUnitFrame(unit, id, config, tick)
|
||||
end
|
||||
|
||||
if UnitIsConnected(this.label .. this.id) or ( pfUI.unlock and pfUI.unlock:IsShown()) then
|
||||
if not this.cache then return end
|
||||
if not this.cache.hp or not this.cache.power then return end
|
||||
|
||||
if this.config.faderange == "1" then
|
||||
if pfUI.api.UnitInRange(this.label .. this.id, 4) or (pfUI.unlock and pfUI.unlock:IsShown()) then
|
||||
if this:GetAlpha() ~= 1 then
|
||||
@@ -291,6 +288,9 @@ function pfUI.uf:CreateUnitFrame(unit, id, config, tick)
|
||||
end
|
||||
end
|
||||
|
||||
if not this.cache then return end
|
||||
if not this.cache.hp or not this.cache.power then return end
|
||||
|
||||
local hpDisplay = this.hp.bar:GetValue()
|
||||
local hpReal = this.cache.hp
|
||||
local hpDiff = abs(hpReal - hpDisplay)
|
||||
|
||||
Reference in New Issue
Block a user