mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-15 22:30:13 -05:00
- Possibly fixed some NaN/divide-by-zero errors that have been cropping up sporadically lately.
This commit is contained in:
@ -1216,7 +1216,7 @@ function PlayerHealth.prototype:Update(unit)
|
|||||||
local percent
|
local percent
|
||||||
|
|
||||||
if incomingHealAmt > 0 then
|
if incomingHealAmt > 0 then
|
||||||
percent = ((self.health + incomingHealAmt) / self.maxHealth)
|
percent = self.maxHealth ~= 0 and ((self.health + incomingHealAmt) / self.maxHealth) or 0
|
||||||
if self.moduleSettings.reverse then
|
if self.moduleSettings.reverse then
|
||||||
percent = 1 - percent
|
percent = 1 - percent
|
||||||
-- Rokiyo: I'm thinking the frama strata should also to be set to medium if we're in reverse.
|
-- Rokiyo: I'm thinking the frama strata should also to be set to medium if we're in reverse.
|
||||||
|
@ -539,7 +539,7 @@ function TargetOfTarget.prototype:Update()
|
|||||||
|
|
||||||
if not IceHUD.IceCore:ShouldUseDogTags() then
|
if not IceHUD.IceCore:ShouldUseDogTags() then
|
||||||
local name = UnitName(self.unit)
|
local name = UnitName(self.unit)
|
||||||
local healthPercentage = math.floor( (health/maxHealth)*100 )
|
local healthPercentage = maxHealth ~= 0 and math.floor( (health/maxHealth)*100 ) or 0
|
||||||
|
|
||||||
self.frame.totName:SetTextColor(1,1,1, 0.9)
|
self.frame.totName:SetTextColor(1,1,1, 0.9)
|
||||||
self.frame.totHealth:SetTextColor(1,1,1, 0.9)
|
self.frame.totHealth:SetTextColor(1,1,1, 0.9)
|
||||||
|
Reference in New Issue
Block a user