- Fixed bug with the player's mana bar not updating its alpha properly when entering the world (i.e. teleporting/hearthing/etc.).

This commit is contained in:
Parnic
2014-10-11 01:28:50 -05:00
parent 37f52f44f1
commit 06f8375dcf

View File

@ -120,7 +120,7 @@ function PlayerMana.prototype:Enable(core)
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle") self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle")
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle") self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
self:RegisterEvent("PLAYER_ENTERING_WORLD", "CheckVehicle") self:RegisterEvent("PLAYER_ENTERING_WORLD", "EnteringWorld")
if not self.CustomOnUpdate then if not self.CustomOnUpdate then
self.CustomOnUpdate = function() self:Update(self.unit) end self.CustomOnUpdate = function() self:Update(self.unit) end
@ -133,6 +133,11 @@ function PlayerMana.prototype:Enable(core)
self:ManaType(nil, self.unit) self:ManaType(nil, self.unit)
end end
function PlayerMana.prototype:EnteringWorld()
self:CheckVehicle()
self:CheckCombat()
end
function PlayerMana.prototype:CheckVehicle() function PlayerMana.prototype:CheckVehicle()
if UnitHasVehicleUI("player") then if UnitHasVehicleUI("player") then
self:EnteringVehicle(nil, "player", true) self:EnteringVehicle(nil, "player", true)