From 79bb3324acbef15edaeee1f265836b1bdaf07416 Mon Sep 17 00:00:00 2001 From: Parnic Date: Sun, 21 Nov 2010 22:01:07 +0000 Subject: [PATCH] - re-fixed a bug causing the player mana module to not update color when a druid left an LFD instance while in a form and was immediately placed back on a mount and not in a form --- modules/PlayerMana.lua | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/modules/PlayerMana.lua b/modules/PlayerMana.lua index 881d138..89a630c 100644 --- a/modules/PlayerMana.lua +++ b/modules/PlayerMana.lua @@ -165,19 +165,23 @@ function PlayerMana.prototype:OnShow() end function PlayerMana.prototype:EnteringVehicle(event, unit, arg2) - if (self.unit == "player" and IceHUD:ShouldSwapToVehicle(unit, arg2)) then - self.unit = "vehicle" - self:RegisterFontStrings() - self:Update(self.unit) + if (self.unit == "player") then + if IceHUD:ShouldSwapToVehicle(unit, arg2) then + self.unit = "vehicle" + self:RegisterFontStrings() + end + self:ManaType(nil, self.unit) end end function PlayerMana.prototype:ExitingVehicle(event, unit) - if (unit == "player" and self.unit == "vehicle") then - self.unit = "player" - self:RegisterFontStrings() - self:Update(self.unit) + if (unit == "player") then + if self.unit == "vehicle" then + self.unit = "player" + self:RegisterFontStrings() + end + self:ManaType(nil, self.unit) end end