mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
- Possibly fixed some NaN/divide-by-zero errors that have been cropping up sporadically lately.
This commit is contained in:
@ -539,7 +539,7 @@ function TargetOfTarget.prototype:Update()
|
||||
|
||||
if not IceHUD.IceCore:ShouldUseDogTags() then
|
||||
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.totHealth:SetTextColor(1,1,1, 0.9)
|
||||
|
Reference in New Issue
Block a user