- mana modules animate regardless of 'predictedPower' setting now

- fixed occasional flickering in the cast bar and threat bar when they are first displayed
- minor code cleanup
This commit is contained in:
Parnic
2010-11-06 03:03:46 +00:00
parent 74b9ace21d
commit fa8b895214
6 changed files with 24 additions and 19 deletions

View File

@ -276,16 +276,12 @@ function IceCastBar.prototype:MyOnUpdate()
scale = self.actionDuration ~= 0 and remainingTime / self.actionDuration or 0
end
if (remainingTime < 0) then
self:UpdateBar(IceHUD:Clamp(scale, 0, 1), self:GetCurrentCastingColor())
if (remainingTime <= 0) then
self:StopBar()
end
-- sanity check to make sure the bar doesn't over/underfill
scale = scale > 1 and 1 or scale
scale = scale < 0 and 0 or scale
self:UpdateBar(scale, self:GetCurrentCastingColor())
local timeString = self.moduleSettings.showCastTime and string.format("%.1fs ", remainingTime) or ""
self:SetBottomText1(timeString .. self.actionMessage)
@ -396,6 +392,8 @@ function IceCastBar.prototype:StopBar()
self.actionStartTime = nil
self.actionDuration = nil
self:SetBottomText1()
self:SetScale(0)
self:Show(false)
end