From 5091a85d5e7d659b7d93e93bf7e498be8ce99dea Mon Sep 17 00:00:00 2001 From: shagu Date: Sun, 20 Sep 2020 13:47:37 +0200 Subject: [PATCH] unitframes: remove icon cache on player buffs --- api/unitframes.lua | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/api/unitframes.lua b/api/unitframes.lua index 95cd7763..1678ff52 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -680,7 +680,6 @@ function pfUI.uf:UpdateConfig() f.buffs[i]:SetHeight(f.config.buffsize) if f:GetName() == "pfPlayer" then - f.buffs[i]:SetScript("OnShow", BuffOnUpdate) f.buffs[i]:SetScript("OnUpdate", BuffOnUpdate) elseif f:GetName() == "pfTarget" and pfUI.expansion == "tbc" then f.buffs[i]:SetScript("OnUpdate", TargetBuffOnUpdate) @@ -1242,20 +1241,15 @@ function pfUI.uf:RefreshUnit(unit, component) local texture, stacks if unit.label == "player" then - stacks = GetPlayerBuffApplications(GetPlayerBuff(PLAYER_BUFF_START_ID+i,"HELPFUL")) - texture = GetPlayerBuffTexture(GetPlayerBuff(PLAYER_BUFF_START_ID+i,"HELPFUL")) + stacks = GetPlayerBuffApplications(GetPlayerBuff(PLAYER_BUFF_START_ID+i,"HELPFUL")) + texture = GetPlayerBuffTexture(GetPlayerBuff(PLAYER_BUFF_START_ID+i,"HELPFUL")) else - texture, stacks = UnitBuff(unitstr, i) + texture, stacks = UnitBuff(unitstr, i) end unit.buffs[i].texture:SetTexture(texture) if texture then - if unit.buffs[i].oldtexture ~= texture then - unit.buffs[i]:Hide() - end - - unit.buffs[i].oldtexture = texture unit.buffs[i]:Show() if stacks > 1 then