From 99c436a2c48d6b990bc7496e10516f272c31b5a3 Mon Sep 17 00:00:00 2001 From: shagu Date: Mon, 10 Apr 2017 19:25:50 +0200 Subject: [PATCH] portrait: fix animation repaint --- api/unitframes.lua | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/api/unitframes.lua b/api/unitframes.lua index 23f6682a..56557b2c 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -634,14 +634,18 @@ function pfUI.uf:RefreshUnit(unit, component) end this.portrait.tex:Hide() this.portrait.model:Show() - this.portrait.model.next:SetUnit(this.label .. this.id) - if this.portrait.model.lastUnit ~= UnitName(this.label .. this.id) - or this.portrait.model:GetModel() ~= this.portrait.model.next:GetModel() then + if this.tick then + this.portrait.model.next:SetUnit(this.label .. this.id) + if this.portrait.model.lastUnit ~= UnitName(this.label .. this.id) or this.portrait.model:GetModel() ~= this.portrait.model.next:GetModel() then + this.portrait.model:SetUnit(this.label .. this.id) + this.portrait.model.lastUnit = UnitName(this.label .. this.id) + this.portrait.model:SetCamera(0) + end + else this.portrait.model:SetUnit(this.label .. this.id) - this.portrait.model.lastUnit = UnitName(this.label .. this.id) + this.portrait.model:SetCamera(0) end - this.portrait.model:SetCamera(0) end end