mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 22:51:53 -05:00
Fixed "divide by zero" errors that could happen in class power counters when switching specs.
This commit is contained in:
@ -771,7 +771,7 @@ end
|
|||||||
function IceClassPowerCounter.prototype:GetGradientColor(curr)
|
function IceClassPowerCounter.prototype:GetGradientColor(curr)
|
||||||
local r, g, b = self:GetCustomColor()
|
local r, g, b = self:GetCustomColor()
|
||||||
local mr, mg, mb = self:GetCustomMinColor()
|
local mr, mg, mb = self:GetCustomMinColor()
|
||||||
local scale = (curr-1)/(self.numRunes-1)
|
local scale = self.numRunes == 1 and 0 or ((curr-1)/(self.numRunes-1))
|
||||||
|
|
||||||
if r < mr then
|
if r < mr then
|
||||||
r = ((r-mr)*scale) + mr
|
r = ((r-mr)*scale) + mr
|
||||||
|
Reference in New Issue
Block a user