Skip to content

Commit

Permalink
Hopefully fixed the issue with frame disappearing
Browse files Browse the repository at this point in the history
  • Loading branch information
d87 committed Dec 6, 2020
1 parent f256289 commit 759e011
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions NugEnergy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -814,16 +814,16 @@ local HideTimer = function(self, time)
local a = pA + (p*rA)
nen:SetAlpha(a)
if self.OnUpdateCounter >= fadeAfter + fadeTime then
self:SetScript("OnUpdate",nil)
if nen:GetAlpha() <= 0.03 then
nen:Hide()
end
nen.hiding = false
NugEnergy:StopHiding()
self.OnUpdateCounter = 0
end
end
function NugEnergy:StartHiding()
if (not self.hiding and self:IsVisible()) then
self:Show()
if (not self.hiding) then
fader:SetScript("OnUpdate", HideTimer)
fader.OnUpdateCounter = 0
self.hiding = true
Expand All @@ -833,6 +833,7 @@ end
function NugEnergy:StopHiding()
-- if self.hiding then
fader:SetScript("OnUpdate", nil)
fader.OnUpdateCounter = 0
self.hiding = false
-- end
end
Expand All @@ -847,8 +848,8 @@ function NugEnergy.UPDATE_STEALTH(self, event, fromUpdateEnergy)
then
self:UNIT_MAXPOWER()
self:UpdateEnergy()
self:SetAlpha(1)
self:StopHiding()
self:SetAlpha(1)
self:Show()
elseif doFadeOut and self:IsVisible() and self:GetAlpha() > NugEnergyDB.outOfCombatAlpha and PowerFilter then
self:StartHiding()
Expand Down

0 comments on commit 759e011

Please sign in to comment.