diff --git a/api/unitframes.lua b/api/unitframes.lua index 14e61030..161fa27e 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -1042,6 +1042,16 @@ function pfUI.uf:RefreshIndicators(unit) unit.restIcon:Hide() end end + + if unit.raidIcon then -- Raid Icon + local raidIcon = UnitName(unitstr) and GetRaidTargetIndex(unitstr) + if unit.config.raidicon == "1" and raidIcon then + SetRaidTargetIconTexture(unit.raidIcon.texture, raidIcon) + unit.raidIcon:Show() + else + unit.raidIcon:Hide() + end + end end local pfDebuffColors = { @@ -1147,21 +1157,6 @@ function pfUI.uf:RefreshUnit(unit, component) if not unit:IsShown() then return end - -- Raid Icon - if unit.raidIcon and ( component == "all" or component == "raidIcon" ) then - if unit.config.raidicon == "0" then - unit.raidIcon:Hide() - else - local raidIcon = GetRaidTargetIndex(unitstr) - if raidIcon and UnitName(unitstr) then - SetRaidTargetIconTexture(unit.raidIcon.texture, raidIcon) - unit.raidIcon:Show() - else - unit.raidIcon:Hide() - end - end - end - -- Buffs if unit.buffs and ( component == "all" or component == "aura" ) then for i=1, unit.config.bufflimit do