Fixed an error while doing mythic+
This commit is contained in:
+19
-14
@@ -5769,15 +5769,18 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
function Details.parser_functions:WORLD_STATE_TIMER_START(...)
|
||||
local zoneName, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceMapID, instanceGroupSize = GetInstanceInfo()
|
||||
if (difficultyID == 8) then
|
||||
if (Details222.MythicPlus.CHALLENGE_MODE_START_AT + 10 > GetTime()) then
|
||||
if (not Details222.MythicPlus.WorldStateTimerStartAt) then
|
||||
local payload1, payload2, payload3 = ...
|
||||
payload1 = payload1 or ""
|
||||
payload2 = payload2 or ""
|
||||
payload3 = payload3 or ""
|
||||
Details222.MythicPlus.LogStep("Event: WORLD_STATE_TIMER_START | payload1: " .. payload1 .. " | payload2: " .. payload2 .. " | payload3: " .. payload3)
|
||||
Details:SendEvent("COMBAT_MYTHICDUNGEON_START")
|
||||
Details222.MythicPlus.WorldStateTimerStartAt = time()
|
||||
if (Details222.MythicPlus.CHALLENGE_MODE_START_AT) then --would be nil if a world timer starts before the challenge mode start event
|
||||
--todo: should also check if the mythic+ is active
|
||||
if (Details222.MythicPlus.CHALLENGE_MODE_START_AT + 10 > GetTime()) then
|
||||
if (not Details222.MythicPlus.WorldStateTimerStartAt) then
|
||||
local payload1, payload2, payload3 = ...
|
||||
payload1 = payload1 or ""
|
||||
payload2 = payload2 or ""
|
||||
payload3 = payload3 or ""
|
||||
Details222.MythicPlus.LogStep("Event: WORLD_STATE_TIMER_START | payload1: " .. payload1 .. " | payload2: " .. payload2 .. " | payload3: " .. payload3)
|
||||
Details:SendEvent("COMBAT_MYTHICDUNGEON_START")
|
||||
Details222.MythicPlus.WorldStateTimerStartAt = time()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -5800,13 +5803,15 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
function Details.parser_functions:CHALLENGE_MODE_COMPLETED(...)
|
||||
Details222.MythicPlus.WorldStateTimerEndAt = time()
|
||||
|
||||
local mapChallengeModeID, level, time, onTime, keystoneUpgradeLevels, practiceRun,
|
||||
oldOverallDungeonScore, newOverallDungeonScore, IsMapRecord, IsAffixRecord,
|
||||
PrimaryAffix, isEligibleForScore, members
|
||||
= C_ChallengeMode.GetCompletionInfo()
|
||||
local mapChallengeModeID, level, time, onTime, keystoneUpgradeLevels, practiceRun, oldOverallDungeonScore, newOverallDungeonScore, IsMapRecord, IsAffixRecord, PrimaryAffix, isEligibleForScore, members = C_ChallengeMode.GetCompletionInfo()
|
||||
|
||||
Details222.MythicPlus.time = math.floor(time / 1000)
|
||||
Details222.MythicPlus.bOnTime = onTime
|
||||
if (time) then
|
||||
Details222.MythicPlus.time = math.floor(time / 1000)
|
||||
Details:Msg("run elapsed time:", DetailsFramework:IntegerToTimer(time / 1000))
|
||||
else
|
||||
Details222.MythicPlus.time = 0.1
|
||||
end
|
||||
|
||||
--send mythic dungeon end event
|
||||
local zoneName, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceMapID, instanceGroupSize = GetInstanceInfo()
|
||||
|
||||
Reference in New Issue
Block a user