diff --git a/oUF_P3lim/oUF_P3lim.lua b/oUF_P3lim/oUF_P3lim.lua
index d2478ca..48cd95c 100644
--- a/oUF_P3lim/oUF_P3lim.lua
+++ b/oUF_P3lim/oUF_P3lim.lua
@@ -46,7 +46,7 @@ end
local function UpdateInfoColor(self, unit)
if(UnitIsTapped(unit) and not UnitIsTappedByPlayer(unit)) then
self:SetTextColor(unpack(colors.tapped))
- elseif(UnitIsDead(unit) or UnitIsGhost(unit) or not UnitIsConnected(unit)) then
+ elseif(not UnitIsConnected(unit)) then
self:SetTextColor(unpack(colors.disconnected))
elseif(not UnitIsPlayer(unit)) then
self:SetTextColor(unpack({UnitSelectionColor(unit)} or colors.health))
@@ -55,6 +55,15 @@ local function UpdateInfoColor(self, unit)
end
end
+local function UpdateMasterLooter(self)
+ self.MasterLooter:ClearAllPoints()
+ if((UnitInParty(self.unit) or UnitInRaid(self.unit)) and UnitIsPartyLeader(self.unit)) then
+ self.MasterLooter:SetPoint('LEFT', self.Leader, 'RIGHT')
+ else
+ self.MasterLooter:SetPoint('TOPLEFT', self, 0, 8)
+ end
+end
+
local function UpdateRuneBar(self, elapsed)
local start, duration, ready = GetRuneCooldown(self:GetID())
@@ -183,6 +192,15 @@ local function PostCreateAuraIcon(self, button, icons)
button.overlay.Hide = function(self) self:SetVertexColor(0.25, 0.25, 0.25) end
end
+local function PostUpdateAuraIcon(self, icons, unit, icon, index, offset, filter, debuff)
+ if(debuff and UnitIsEnemy('player', unit)) then
+ local _, _, _, _, _, duration, _, isPlayer = UnitAura(unit, index, filter)
+ if(duration and duration > 0 and not isPlayer) then
+ icon.cd:Hide()
+ end
+ end
+end
+
local function CreateStyle(self, unit)
self.colors = colors
self.menu = menu
@@ -240,6 +258,11 @@ local function CreateStyle(self, unit)
self.MasterLooter:SetHeight(16)
self.MasterLooter:SetWidth(16)
+ table.insert(self.__elements, UpdateMasterLooter)
+ self:RegisterEvent('PARTY_LOOT_METHOD_CHANGED', UpdateMasterLooter)
+ self:RegisterEvent('PARTY_MEMBERS_CHANGED', UpdateMasterLooter)
+ self:RegisterEvent('PARTY_LEADER_CHANGED', UpdateMasterLooter)
+
if(unit == 'player' or unit == 'pet') then
self.Power.Text = self.Power:CreateFontString(nil, 'OVERLAY', 'GameFontHighlightSmall')
self.Power.Text:SetPoint('LEFT', self.Health, 2, -1)
@@ -468,6 +491,7 @@ local function CreateStyle(self, unit)
self.DebuffHighlightBackdrop = true
self.DebuffHighlightFilter = true
+ self.PostUpdateAuraIcon = PostUpdateAuraIcon
self.PostCreateAuraIcon = PostCreateAuraIcon
self.PostUpdateHealth = PostUpdateHealth
self.PostUpdatePower = PostUpdatePower