From 4481720d49389382962bbcbdc0cc0200a23c7b51 Mon Sep 17 00:00:00 2001 From: Flamanis Date: Fri, 4 Oct 2024 02:07:58 -0500 Subject: [PATCH] Subtract deaths from total run time --- core/parser.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/parser.lua b/core/parser.lua index e59a2d480..935174aaa 100755 --- a/core/parser.lua +++ b/core/parser.lua @@ -6020,6 +6020,17 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 Details222.MythicPlus.BackgroundTexture = backgroundTexture if (time) then + --Subtract death time from time of run to get the true time + local deaths = C_ChallengeMode.GetDeathCount() + if deaths and deaths > 0 then + local secondsPerDeath = 5 + if level >= 7 then + secondsPerDeath = 15 + end + + time = time - deaths * (secondsPerDeath * 1000) + end + Details222.MythicPlus.time = math.floor(time / 1000) Details:Msg("run elapsed time:", DetailsFramework:IntegerToTimer(time / 1000)) else