From 06f8375dcfe86089ee2f50f461266ed2ffa0470c Mon Sep 17 00:00:00 2001 From: Parnic Date: Sat, 11 Oct 2014 01:28:50 -0500 Subject: [PATCH] - Fixed bug with the player's mana bar not updating its alpha properly when entering the world (i.e. teleporting/hearthing/etc.). --- modules/PlayerMana.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/PlayerMana.lua b/modules/PlayerMana.lua index 89a630c..5b7e3cd 100644 --- a/modules/PlayerMana.lua +++ b/modules/PlayerMana.lua @@ -120,7 +120,7 @@ function PlayerMana.prototype:Enable(core) self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle") self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle") - self:RegisterEvent("PLAYER_ENTERING_WORLD", "CheckVehicle") + self:RegisterEvent("PLAYER_ENTERING_WORLD", "EnteringWorld") if not self.CustomOnUpdate then self.CustomOnUpdate = function() self:Update(self.unit) end @@ -133,6 +133,11 @@ function PlayerMana.prototype:Enable(core) self:ManaType(nil, self.unit) end +function PlayerMana.prototype:EnteringWorld() + self:CheckVehicle() + self:CheckCombat() +end + function PlayerMana.prototype:CheckVehicle() if UnitHasVehicleUI("player") then self:EnteringVehicle(nil, "player", true)