- Yet more code updates.
HonorGoG [09-16-19 - 07:27]
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