diff --git a/modules/PlayerHealth.lua b/modules/PlayerHealth.lua index 63c7656..af96902 100644 --- a/modules/PlayerHealth.lua +++ b/modules/PlayerHealth.lua @@ -1216,7 +1216,7 @@ function PlayerHealth.prototype:Update(unit) local percent 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 percent = 1 - percent -- Rokiyo: I'm thinking the frama strata should also to be set to medium if we're in reverse. diff --git a/modules/TargetOfTarget.lua b/modules/TargetOfTarget.lua index a9a4bed..5cdba2e 100644 --- a/modules/TargetOfTarget.lua +++ b/modules/TargetOfTarget.lua @@ -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)