Skip to content

Commit 161ca5b

Browse files
committed
ouf changes:
- two things: - oUF-wow/oUF#706 - oUF-wow/oUF#707
1 parent 724fdd9 commit 161ca5b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

ElvUI_Libraries/Core/oUF/elements/portrait.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,9 @@ local function Enable(self, unit)
144144
--
145145
-- DISABLE isn't used as it fires when we most likely don't have the
146146
-- information we want.
147-
if(unit == 'party') then
147+
if unit == 'party' or unit == 'target' then
148148
oUF:RegisterEvent(self, 'PARTY_MEMBER_ENABLE', Path)
149+
oUF:RegisterEvent(self, 'PARTY_MEMBER_DISABLE', Path)
149150
end
150151

151152
element:Show()
@@ -163,6 +164,7 @@ local function Disable(self)
163164
oUF:UnregisterEvent(self, 'UNIT_PORTRAIT_UPDATE', Path)
164165
oUF:UnregisterEvent(self, 'PORTRAITS_UPDATED', Path)
165166
oUF:UnregisterEvent(self, 'PARTY_MEMBER_ENABLE', Path)
167+
oUF:UnregisterEvent(self, 'PARTY_MEMBER_DISABLE', Path)
166168
oUF:UnregisterEvent(self, 'UNIT_CONNECTION', Path)
167169
end
168170
end

ElvUI_Libraries/Core/oUF/elements/power.lua

+4
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,12 @@ local function SetColorDisconnected(element, state, isForced)
290290
element.colorDisconnected = state
291291
if(state) then
292292
oUF:RegisterEvent(element.__owner, 'UNIT_CONNECTION', ColorPath)
293+
oUF:RegisterEvent(element.__owner, 'PARTY_MEMBER_ENABLE', ColorPath)
294+
oUF:RegisterEvent(element.__owner, 'PARTY_MEMBER_DISABLE', ColorPath)
293295
else
294296
oUF:UnregisterEvent(element.__owner, 'UNIT_CONNECTION', ColorPath)
297+
oUF:UnregisterEvent(element.__owner, 'PARTY_MEMBER_ENABLE', ColorPath)
298+
oUF:UnregisterEvent(element.__owner, 'PARTY_MEMBER_DISABLE', ColorPath)
295299
end
296300
end
297301
end

0 commit comments

Comments
 (0)