From b1dca1639d397bc745cd3d124ac62913aa5d0a53 Mon Sep 17 00:00:00 2001 From: omicron Date: Sat, 16 Dec 2023 15:22:54 +0100 Subject: [PATCH] Properly update unit frames on GROUP_ROSTER_UPDATE --- src/types/unitframe.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/types/unitframe.lua b/src/types/unitframe.lua index b1f40e1..6f10b8f 100644 --- a/src/types/unitframe.lua +++ b/src/types/unitframe.lua @@ -425,6 +425,7 @@ function UnitFrame:RegisterEvents() end end + secure:RegisterEvent("GROUP_ROSTER_UPDATE") secure:RegisterUnitEvent("UNIT_AURA", unit) secure:RegisterUnitEvent("UNIT_HEALTH", unit) secure:RegisterUnitEvent("UNIT_MAXHEALTH", unit) @@ -467,6 +468,13 @@ function UnitFrame:UNIT_ABSORB_AMOUNT_CHANGED() self:UpdateShield() end +function UnitFrame:GROUP_ROSTER_UPDATE() + if self:HasUnitChanged() then + self:UpdateAll(true) + return + end +end + function UnitFrame:UNIT_AURA(unit, info) if self:HasUnitChanged() then self:UpdateAll(true)