From b11cb2c95eb94255950661c1e1b0fbeab4758d73 Mon Sep 17 00:00:00 2001 From: HonorGoG Date: Mon, 16 Sep 2019 00:27:18 -0700 Subject: [PATCH] - Yet more code updates. --- TitanClassicRegen/TitanClassicRegen.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TitanClassicRegen/TitanClassicRegen.lua b/TitanClassicRegen/TitanClassicRegen.lua index 0a8dc26..1582092 100644 --- a/TitanClassicRegen/TitanClassicRegen.lua +++ b/TitanClassicRegen/TitanClassicRegen.lua @@ -71,7 +71,7 @@ function TitanPanelRegenButton_OnLoad(self) }; self:RegisterEvent("UNIT_HEALTH"); - self:RegisterEvent("UNIT_MANA"); + self:RegisterEvent("UNIT_POWER_UPDATE"); self:RegisterEvent("PLAYER_ENTERING_WORLD"); self:RegisterEvent("PLAYER_REGEN_DISABLED"); self:RegisterEvent("PLAYER_REGEN_ENABLED"); @@ -81,7 +81,7 @@ end -- NAME : TitanPanelXPButton_OnEvent -- DESC : Parse events registered to addon and act on them -- ************************************************************************** -function TitanPanelRegenButton_OnEvent(self, event, ...) +function TitanPanelRegenButton_OnEvent(self, event, a1, ...) if ( event == "PLAYER_ENTERING_WORLD") then if (UnitPowerMax("player") == 0) then TitanSetVar(TITAN_REGEN_ID, "ShowMPRegen", 0); @@ -120,7 +120,7 @@ function TitanPanelRegenButton_OnEvent(self, event, ...) end if (TitanGetVar(TITAN_REGEN_ID,"ShowMPRegen") == 1) then - if ( event == "UNIT_MANA" and a1 == "player" ) then + if ( event == "UNIT_POWER_UPDATE" and a1 == "player" ) then currMana = UnitPower("player"); runUpdate = 1; if ( currMana > TITAN_RegenCurrMana and TITAN_RegenCurrMana ~= 0 ) then -- 1.7.9.5