From 5c896ff567efdba7d6f53adbedecaa2de6e4ed5a Mon Sep 17 00:00:00 2001 From: shagu Date: Sun, 15 Jan 2017 22:06:20 +0100 Subject: [PATCH] unitframes: update portrait on group change --- modules/unitframes.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/unitframes.lua b/modules/unitframes.lua index be228eeb..80c6a507 100644 --- a/modules/unitframes.lua +++ b/modules/unitframes.lua @@ -326,6 +326,7 @@ function pfUI.uf:CreatePortrait(frame, pos, spacing) frame.portrait:RegisterEvent("UNIT_MODEL_CHANGED") frame.portrait:RegisterEvent("PLAYER_ENTERING_WORLD") frame.portrait:RegisterEvent("PLAYER_TARGET_CHANGED") + frame.portrait:RegisterEvent("PARTY_MEMBERS_CHANGED") frame.portrait.base = frame frame.portrait.pos = pos @@ -342,7 +343,11 @@ function pfUI.uf:CreatePortrait(frame, pos, spacing) local id = this.base.id or "" local unitstr = unit .. id - if event == "PLAYER_ENTERING_WORLD" or (unitstr == "target" and event == "PLAYER_TARGET_CHANGED") or (unitstr == "targettarget" and event == "PLAYER_TARGET_CHANGED") or ( arg1 and arg1 == unitstr ) then + if event == "PLAYER_ENTERING_WORLD" or + ( event == "PARTY_MEMBERS_CHANGED" and this.base.label and this.base.label == "party" ) or + ( unitstr == "target" and event == "PLAYER_TARGET_CHANGED" ) or + ( unitstr == "targettarget" and event == "PLAYER_TARGET_CHANGED" ) or + ( arg1 and arg1 == unitstr ) then pfUI.uf:UpdatePortrait() end end)