From 55ad8b3b9b730559f107a937dca9b8f0d52103cb Mon Sep 17 00:00:00 2001 From: shagu Date: Sun, 15 Jan 2017 22:07:17 +0100 Subject: [PATCH] unitframes: update group on groupmember change --- modules/unitframes.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/unitframes.lua b/modules/unitframes.lua index 80c6a507..2b53ebde 100644 --- a/modules/unitframes.lua +++ b/modules/unitframes.lua @@ -430,16 +430,22 @@ function pfUI.uf:CreateUnit(unit) unit:RegisterEvent("UNIT_FOCUS") unit:RegisterEvent("RAID_ROSTER_UPDATE") + unit:RegisterEvent("PARTY_MEMBERS_CHANGED") + unit:SetScript("OnShow", function () pfUI.uf:RefreshUnit(this) end) unit:SetScript("OnEvent", function () + if this.label == "party" and event == "PARTY_MEMBERS_CHANGED" then + pfUI.uf:RefreshUnit(this) + end + if this.label == "raid" and event == "RAID_ROSTER_UPDATE" then pfUI.uf:RefreshUnit(this) end - if arg1 == this.label .. this.id then + if arg1 and arg1 == this.label .. this.id then pfUI.uf:RefreshUnit(this) end end)