Skip to content

Commit

Permalink
Added into the overall m+ combat, the value for the total runtime of …
Browse files Browse the repository at this point in the history
…the dungeon ".elapsed_time"
  • Loading branch information
Tercioo committed Oct 11, 2024
1 parent 9959c82 commit e8b9f39
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion functions/mythicdungeon/segments.lua
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ function DetailsMythicPlusFrame.MergeSegmentsOnEnd() --~merge
Details222.StartCombat()

--get the current combat just created and the table with all past segments
---@type combat
local newCombat = Details:GetCurrentCombat()
local segmentsTable = Details:GetCombatSegments()

Expand Down Expand Up @@ -253,7 +254,8 @@ function DetailsMythicPlusFrame.MergeSegmentsOnEnd() --~merge
EndedAt = Details.MythicPlus.EndedAt, --the end of the run
WorldStateTimerStart = Details222.MythicPlus.WorldStateTimerStartAt,
WorldStateTimerEnd = Details222.MythicPlus.WorldStateTimerEndAt,
RunTime = Details222.MythicPlus.time,
RunTime = Details222.MythicPlus.time, --this is the time that discounted the deaths penalty
TotalTime = Details222.MythicPlus.ElapsedTime, --this is the total time of the run
TimeInCombat = timeInCombat,
SegmentID = "overall", --segment number within the dungeon
RunID = Details.mythic_dungeon_id,
Expand Down Expand Up @@ -324,6 +326,7 @@ function DetailsMythicPlusFrame.MergeSegmentsOnEnd() --~merge
--check if both values are valid, this can get invalid if the player leaves the dungeon before the timer ends or the game crashes
if (type(Details222.MythicPlus.time) == "number") then
newCombat.run_time = Details222.MythicPlus.time
newCombat.elapsed_time = Details222.MythicPlus.ElapsedTime
Details222.MythicPlus.LogStep("GetCompletionInfo() Found, Time: " .. Details222.MythicPlus.time)

elseif (newCombat.is_mythic_dungeon.WorldStateTimerEnd and newCombat.is_mythic_dungeon.WorldStateTimerStart) then
Expand Down

0 comments on commit e8b9f39

Please sign in to comment.