mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- fixed divide-by-zero causing a crash on the PTR (this *really* shouldn't cause a crash since it's UI script, but it would appear that the engine is not check for div-by-0 on the PTR. this could potentially happen in a lot of other places...)
This commit is contained in:
@ -109,8 +109,9 @@ function PetHealth.prototype:Update(unit)
|
||||
color = "Dead"
|
||||
end
|
||||
|
||||
|
||||
self:UpdateBar(self.health/self.maxHealth, color)
|
||||
if (self.maxHealth > 0) then
|
||||
self:UpdateBar(self.health/self.maxHealth, color)
|
||||
end
|
||||
|
||||
if not IceHUD.IceCore:ShouldUseDogTags() then
|
||||
self:SetBottomText1(math.floor(self.healthPercentage * 100))
|
||||
|
Reference in New Issue
Block a user