mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- added tons of divide-by-zero protection all over the place
- general cleanup of values passed to UpdateBar
This commit is contained in:
@ -293,8 +293,8 @@ function TargetCC.prototype:UpdateTargetDebuffs(unit, isUpdate)
|
||||
if (name ~= nil) then
|
||||
self:Show(true)
|
||||
|
||||
if (duration ~= nil) then
|
||||
self:UpdateBar(remaining / duration, "CC:" .. self.debuffList[name])
|
||||
if (duration ~= nil and duration > 0) then
|
||||
self:UpdateBar(duration > 0 and remaining / duration or 0, "CC:" .. self.debuffList[name])
|
||||
self:SetBottomText2(floor(remaining * 10) / 10)
|
||||
else
|
||||
self:UpdateBar(0, "CC:" .. self.debuffList[name])
|
||||
|
Reference in New Issue
Block a user