From cacb4a304f98220940f6f33f56360105e4148432 Mon Sep 17 00:00:00 2001 From: shagu Date: Wed, 11 Apr 2018 21:31:53 +0200 Subject: [PATCH] unitframes: draw lootmaster icon on all frames --- api/unitframes.lua | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/api/unitframes.lua b/api/unitframes.lua index 4385d98e..71311d73 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -948,12 +948,11 @@ function pfUI.uf:RefreshUnit(unit, component) -- Loot Icon if unit.lootIcon and ( component == "all" or component == "lootIcon" ) then - local _, lootmaster = GetLootMethod() - if GetNumPartyMembers() == 0 and GetNumRaidMembers() == 0 then - unit.lootIcon:Hide() - elseif lootmaster and ( - ( unit.label == "party" and tonumber(unit.id) == lootmaster ) or - ( unit.label == "player" and lootmaster == 0 ) )then + -- no third return value here.. but leaving this as a hint + local method, group, raid = GetLootMethod() + local name = group and UnitName(group == 0 and "player" or "party"..group) or raid and UnitName("raid"..raid) or nil + + if name and name == UnitName(unit.label .. unit.id) then unit.lootIcon:Show() else unit.lootIcon:Hide()