unitframes: move raidicon into proper function

This commit is contained in:
shagu
2019-05-19 14:51:42 +02:00
parent 5abf87d2fd
commit 812d2d5f3b
+10 -15
View File
@@ -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