mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- 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:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user