agro indicator fix

agro indicator fix
This commit is contained in:
Meow
2026-01-21 20:03:15 +01:00
parent 564eee99e9
commit c890e44be1
+16 -10
View File
@@ -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")