From c890e44be169cf27c9433e6f2157d0decd067e60 Mon Sep 17 00:00:00 2001 From: Meow <30401521+me0wg4ming@users.noreply.github.com> Date: Wed, 21 Jan 2026 20:03:15 +0100 Subject: [PATCH] agro indicator fix agro indicator fix --- api/unitframes.lua | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/api/unitframes.lua b/api/unitframes.lua index ce58ef01..0e6b99c8 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -1090,6 +1090,22 @@ function pfUI.uf.OnUpdate() end end + -- Combat/Aggro Indicators (separate throttle, works for all frames including player) + if not this.lastCombatCheck then this.lastCombatCheck = GetTime() + 0.2 end + if this.lastCombatCheck < GetTime() then + this.lastCombatCheck = GetTime() + 0.2 + + if this.config.squareaggro == "1" and pfUI.api.UnitHasAggro(this.label .. this.id) > 0 then + this.combat.tex:SetTexture(1,.2,0) + this.combat:Show() + elseif this.config.squarecombat == "1" and UnitAffectingCombat(this.label .. this.id) then + this.combat.tex:SetTexture(1,1,.2) + this.combat:Show() + else + this.combat:Hide() + end + end + -- trigger eventless actions (online/offline/range) if not this.lastTick then this.lastTick = GetTime() + (this.tick or .2) end if this.lastTick and this.lastTick < GetTime() then @@ -1123,16 +1139,6 @@ function pfUI.uf.OnUpdate() this.glow:Hide() end - if this.config.squareaggro == "1" and pfUI.api.UnitHasAggro(this.label .. this.id) > 0 then - this.combat.tex:SetTexture(1,.2,0) - this.combat:Show() - elseif this.config.squarecombat == "1" and UnitAffectingCombat(this.label .. this.id) then - this.combat.tex:SetTexture(1,1,.2) - this.combat:Show() - else - this.combat:Hide() - end - -- update everything on eventless frames (targettarget, etc) if this.tick then pfUI.uf:RefreshUnit(this, "all")