Skip to content

Commit

Permalink
https://github.com/oUF-wow/oUF/pull/692
Browse files Browse the repository at this point in the history
kodewdle committed Nov 20, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 48c7de1 commit e3a0bd6
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions ElvUI_Libraries/Core/oUF/elements/combatindicator.lua
Original file line number Diff line number Diff line change
@@ -76,10 +76,13 @@ local function Enable(self, unit)
element.__owner = self
element.ForceUpdate = ForceUpdate

self:RegisterEvent('UNIT_COMBAT', Path)
self:RegisterEvent('UNIT_FLAGS', Path)
self:RegisterEvent('PLAYER_REGEN_DISABLED', Path, true)
self:RegisterEvent('PLAYER_REGEN_ENABLED', Path, true)
if(unit == 'player') then
self:RegisterEvent('PLAYER_REGEN_DISABLED', Path, true)
self:RegisterEvent('PLAYER_REGEN_ENABLED', Path, true)
else
self:RegisterEvent('UNIT_COMBAT', Path)
self:RegisterEvent('UNIT_FLAGS', Path)
end

if(element:IsObjectType('Texture') and not element:GetTexture()) then
element:SetTexture([[Interface\CharacterFrame\UI-StateIcon]])
@@ -95,10 +98,13 @@ local function Disable(self)
if(element) then
element:Hide()

self:UnregisterEvent('UNIT_COMBAT', Path)
self:UnregisterEvent('UNIT_FLAGS', Path)
self:UnregisterEvent('PLAYER_REGEN_DISABLED', Path)
self:UnregisterEvent('PLAYER_REGEN_ENABLED', Path)
if(self.unit == 'player') then
self:UnregisterEvent('PLAYER_REGEN_DISABLED', Path)
self:UnregisterEvent('PLAYER_REGEN_ENABLED', Path)
else
self:UnregisterEvent('UNIT_COMBAT', Path)
self:UnregisterEvent('UNIT_FLAGS', Path)
end
end
end

0 comments on commit e3a0bd6

Please sign in to comment.