From 60587b22f87ecd948700b5cb20071b40d8e55d11 Mon Sep 17 00:00:00 2001 From: Parnic Date: Tue, 6 Jul 2021 11:34:52 -0500 Subject: [PATCH] Fix energy ticker when zoning back into an instance after dying Instead of unhooking the event when we're dead, just hide the ticker when dead. This ensures, regardless of the order the events come in when zoning back into an instance, reviving, etc., the ticker is always shown when appropriate. WowAce ticket #316 --- modules/PlayerMana.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/PlayerMana.lua b/modules/PlayerMana.lua index b07ca27..3f5203e 100644 --- a/modules/PlayerMana.lua +++ b/modules/PlayerMana.lua @@ -280,7 +280,7 @@ function PlayerMana.prototype:ManaType(event, unit) if self:ShouldUseTicker() then -- register ticker for rogue energy - if (self.moduleSettings.tickerEnabled and (self.manaType == SPELL_POWER_ENERGY) and self.alive) then + if self.moduleSettings.tickerEnabled and self.manaType == SPELL_POWER_ENERGY then self.tickerFrame:Show() self.tickerFrame:SetScript("OnUpdate", function() self:EnergyTick() end) else @@ -438,7 +438,7 @@ function PlayerMana.prototype:EnergyTick() return end - if not (self.tickStart) then + if not self.tickStart or not self.alive then self.tickerFrame:Hide() return end