mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-19 19:10:49 +00:00
unitframes: wait for stable unit before updating
This commit is contained in:
@@ -925,6 +925,20 @@ function pfUI.uf.OnUpdate()
|
|||||||
local unitstr = this.label .. this.id
|
local unitstr = this.label .. this.id
|
||||||
|
|
||||||
this.lastTick = GetTime() + (this.tick or .2)
|
this.lastTick = GetTime() + (this.tick or .2)
|
||||||
|
|
||||||
|
-- target target has a huge delay, make sure to not tick during range checks
|
||||||
|
-- by waiting for a stable name over three ticks otherwise aborting the update.
|
||||||
|
if this.label == "targettarget" or this.label == "targettargettarget" then
|
||||||
|
local name = UnitName(this.label)
|
||||||
|
if name ~= this.namebuf1 then
|
||||||
|
this.namebuf1 = name
|
||||||
|
return
|
||||||
|
elseif name ~= this.namebuf2 then
|
||||||
|
this.namebuf2 = name
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
pfUI.uf:RefreshUnitState(this)
|
pfUI.uf:RefreshUnitState(this)
|
||||||
pfUI.uf:RefreshIndicators(this)
|
pfUI.uf:RefreshIndicators(this)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user