From 77a83197e94ebfb37f40bb0f72e2e8d28cf4563f Mon Sep 17 00:00:00 2001 From: shagu Date: Mon, 10 Feb 2020 19:54:27 +0100 Subject: [PATCH] unitframes: perform full updates on pet changes --- api/unitframes.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/api/unitframes.lua b/api/unitframes.lua index 210bcdef..4038bd3b 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -672,7 +672,9 @@ end function pfUI.uf.OnEvent() -- update regular frames - if this.label == "target" and event == "PLAYER_TARGET_CHANGED" then + if event == "PLAYER_ENTERING_WORLD" then + pfUI.uf:RefreshUnit(this, "all") + elseif this.label == "target" and event == "PLAYER_TARGET_CHANGED" then pfUI.uf:RefreshUnit(this, "all") elseif ( this.label == "raid" or this.label == "party" or this.label == "player" ) and event == "PARTY_MEMBERS_CHANGED" then pfUI.uf:RefreshUnit(this, "all") @@ -684,9 +686,9 @@ function pfUI.uf.OnEvent() pfUI.uf:RefreshUnit(this, "all") elseif this.label == "player" and (event == "PLAYER_AURAS_CHANGED" or event == "UNIT_INVENTORY_CHANGED") then pfUI.uf:RefreshUnit(this, "aura") - elseif event == "PLAYER_ENTERING_WORLD" then + elseif this.label == "pet" and event == "UNIT_PET" then pfUI.uf:RefreshUnit(this, "all") - elseif ( event == "UNIT_HAPPINESS" or event == "UNIT_PET" ) and this.label == "pet" then + elseif this.label == "pet" and event == "UNIT_HAPPINESS" then pfUI.uf:RefreshUnit(this) -- UNIT_XXX Events