Skip to content

Commit

Permalink
Subtract deaths from total run time
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamanis committed Oct 4, 2024
1 parent 3e92115 commit 4481720
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions core/parser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4481720

Please sign in to comment.