Skip to content

Commit

Permalink
phaseindicator: register UNIT_PHASE as a unit event
Browse files Browse the repository at this point in the history
  • Loading branch information
Rainrider committed Dec 28, 2018
1 parent dd5cebb commit 7f85072
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions elements/phaseindicator.lua
Expand Up @@ -26,6 +26,7 @@ local _, ns = ...
local oUF = ns.oUF
local function Update(self, event)
local unit = self.unit
local element = self.PhaseIndicator
--[[ Callback: PhaseIndicator:PreUpdate()
Expand All @@ -37,8 +38,8 @@ local function Update(self, event)
element:PreUpdate()
end
local isInSamePhase = UnitInPhase(self.unit) and not UnitIsWarModePhased(self.unit)
if(not isInSamePhase and UnitIsPlayer(self.unit) and UnitIsConnected(self.unit)) then
local isInSamePhase = UnitInPhase(unit) and not UnitIsWarModePhased(unit)
if(not isInSamePhase and UnitIsPlayer(unit) and UnitIsConnected(unit)) then
element:Show()
else
element:Hide()
Expand Down Expand Up @@ -76,7 +77,7 @@ local function Enable(self)
element.__owner = self
element.ForceUpdate = ForceUpdate
self:RegisterEvent('UNIT_PHASE', Path, true)
self:RegisterEvent('UNIT_PHASE', Path)
if(element:IsObjectType('Texture') and not element:GetTexture()) then
element:SetTexture([[Interface\TargetingFrame\UI-PhasingIcon]])
Expand Down

0 comments on commit 7f85072

Please sign in to comment.