Possible fix to reported issue

I can't reproduce the problem, but this should cover it if it happens.

https://www.wowace.com/projects/ice-hud/issues/344
This commit is contained in:
Parnic
2023-06-05 17:39:36 -05:00
parent 343ac7b70b
commit 4d71dcc660
3 changed files with 22 additions and 7 deletions

View File

@ -386,19 +386,24 @@ function IceCastBar.prototype:MyOnUpdate()
self.action == IceCastBar.Actions.Success or
self.action == IceCastBar.Actions.Failure)
then
local scale = GetTime() - self.actionStartTime
local scale
if self.actionStartTime then
scale = GetTime() - self.actionStartTime
end
if (scale > 1) then
if scale and (scale > 1) then
self:StopBar()
return
end
self:UpdateBar(1, self:GetCurrentCastingColor())
if (self.action == IceCastBar.Actions.Failure) then
self:FlashBar("CastFail", 1-scale, self.actionMessage, "CastFail")
else
self:FlashBar("CastSuccess", 1-scale, self.actionMessage)
if scale then
if (self.action == IceCastBar.Actions.Failure) then
self:FlashBar("CastFail", 1-scale, self.actionMessage, "CastFail")
else
self:FlashBar("CastSuccess", 1-scale, self.actionMessage)
end
end
return
end
@ -465,7 +470,9 @@ function IceCastBar.prototype:GetCurrentCastingColor()
end
function IceCastBar.prototype:FlashBar(color, alpha, text, textColor)
self.frame:SetAlpha(alpha)
if alpha then
self.frame:SetAlpha(alpha)
end
local r, g, b = self.settings.backgroundColor.r, self.settings.backgroundColor.g, self.settings.backgroundColor.b
if (self.settings.backgroundToggle) then