Moved Round down for other modules to use

This commit is contained in:
Parnic
2018-02-10 17:41:44 -06:00
parent 6d2a6392eb
commit 5cf4ec7457
2 changed files with 10 additions and 11 deletions

View File

@ -1433,6 +1433,16 @@ function IceBarElement.prototype:SetScaledColor(colorVar, percent, maxColor, min
colorVar.b = ((maxColor.b - minColor.b) * percent) + minColor.b
end
function IceBarElement.prototype:Round(num)
if (num > 1000000) then
return IceHUD:MathRound(num/1000000, 1) .. "M"
end
if (num > 1000) then
return IceHUD:MathRound(num/1000, 1) .. "k"
end
return num
end
-- To be overridden
function IceBarElement.prototype:Update()
end

View File

@ -972,17 +972,6 @@ function IceTargetHealth.prototype:UpdateRaidTargetIcon()
end
function IceTargetHealth.prototype:Round(health)
if (health > 1000000) then
return IceHUD:MathRound(health/1000000, 1) .. "M"
end
if (health > 1000) then
return IceHUD:MathRound(health/1000, 1) .. "k"
end
return health
end
function IceTargetHealth.prototype:CheckPvP()
local pvpMode = nil
local minx, maxx, miny, maxy