From 0940294067287b2bd95f8ad96c038de48dda2df4 Mon Sep 17 00:00:00 2001 From: Lynn Date: Sat, 8 Jun 2024 14:06:30 +0200 Subject: [PATCH] Another div by 0 error when not in arena --- frames/window_currentdps.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frames/window_currentdps.lua b/frames/window_currentdps.lua index 578299ca..8718a4ee 100644 --- a/frames/window_currentdps.lua +++ b/frames/window_currentdps.lua @@ -759,7 +759,10 @@ function Details:CreateCurrentDpsFrame(parent, name) local dpsBarFrame = DetailsArenaDpsBars.splitBar --a percenntagem na barra esta sendo setada corretamente, porem a animação não esta funcrtionando ainda - local percentValue = teamGreenDps / totalDamage + local percentValue = 0 + if (totalDamage > 0) then + percentValue = teamGreenDps / totalDamage + end percentValue = Saturate(percentValue) --print(percentValue) @@ -963,4 +966,4 @@ function DetailsTestSplitBar() loopTime = 0.1 end end) -end \ No newline at end of file +end