diff --git a/classes/class_damage.lua b/classes/class_damage.lua index 07a7f211..bff43cc0 100644 --- a/classes/class_damage.lua +++ b/classes/class_damage.lua @@ -3615,7 +3615,7 @@ function damageClass.PredictedAugSpellsOnEnter(self) local combatTimeMinutes, combatTimeSeconds = math.floor(combatTime / 60), math.floor(combatTime % 60) GameCooltip:AddLine("Combat Time", combatTimeMinutes .. "m " .. combatTimeSeconds .. "s" .. " (" .. format("%.1f", 100) .. "%)") GameCooltip:AddIcon([[Interface\TARGETINGFRAME\UnitFrameIcons]], nil, nil, iconSize, iconSize, iconBorderInfo.L, iconBorderInfo.R, iconBorderInfo.T, iconBorderInfo.B) - Details:AddTooltipBackgroundStatusbar(false, 100, true, "limegreen") + Details:AddTooltipBackgroundStatusbar(false, 100, true, "darkgreen") GameCooltip:AddLine("", "") GameCooltip:AddIcon("", nil, nil, 1, 1) @@ -3631,10 +3631,10 @@ function damageClass.PredictedAugSpellsOnEnter(self) local minutes, seconds = math.floor(uptime / 60), math.floor(uptime % 60) if (minutes > 0) then GameCooltip:AddLine(spellName, minutes .. "m " .. seconds .. "s" .. " (" .. format("%.1f", uptimePercent) .. "%)") - Details:AddTooltipBackgroundStatusbar(false, uptimePercent, true, sourceName and "limegreen") + Details:AddTooltipBackgroundStatusbar(false, uptimePercent, true, sourceName and "darkgreen") else GameCooltip:AddLine(spellName, seconds .. "s" .. " (" .. format("%.1f", uptimePercent) .. "%)") - Details:AddTooltipBackgroundStatusbar(false, uptimePercent, true, sourceName and "limegreen") + Details:AddTooltipBackgroundStatusbar(false, uptimePercent, true, sourceName and "darkgreen") end GameCooltip:AddIcon(spellIcon, nil, nil, iconSize, iconSize, iconBorderInfo.L, iconBorderInfo.R, iconBorderInfo.T, iconBorderInfo.B) @@ -3659,10 +3659,10 @@ function damageClass.PredictedAugSpellsOnEnter(self) local minutes, seconds = math.floor(uptime / 60), math.floor(uptime % 60) if (minutes > 0) then GameCooltip:AddLine(spellName, minutes .. "m " .. seconds .. "s" .. " (" .. format("%.1f", uptimePercent) .. "%)") - Details:AddTooltipBackgroundStatusbar(false, uptimePercent, true, "limegreen") + Details:AddTooltipBackgroundStatusbar(false, uptimePercent, true, "darkgreen") else GameCooltip:AddLine(spellName, seconds .. "s" .. " (" .. format("%.1f", uptimePercent) .. "%)") - Details:AddTooltipBackgroundStatusbar(false, uptimePercent, true, "limegreen") + Details:AddTooltipBackgroundStatusbar(false, uptimePercent, true, "darkgreen") end GameCooltip:AddIcon(spellIcon, nil, nil, iconSize, iconSize, iconBorderInfo.L, iconBorderInfo.R, iconBorderInfo.T, iconBorderInfo.B) @@ -3679,10 +3679,10 @@ function damageClass.PredictedAugSpellsOnEnter(self) local minutes, seconds = math.floor(uptime / 60), math.floor(uptime % 60) if (minutes > 0) then GameCooltip:AddLine(spellName, minutes .. "m " .. seconds .. "s" .. " (" .. format("%.1f", uptimePercent) .. "%)") - Details:AddTooltipBackgroundStatusbar(false, uptimePercent, true, "limegreen") + Details:AddTooltipBackgroundStatusbar(false, uptimePercent, true, "darkgreen") else GameCooltip:AddLine(spellName, seconds .. "s" .. " (" .. format("%.1f", uptimePercent) .. "%)") - Details:AddTooltipBackgroundStatusbar(false, uptimePercent, true, "limegreen") + Details:AddTooltipBackgroundStatusbar(false, uptimePercent, true, "darkgreen") end GameCooltip:AddIcon(spellIcon, nil, nil, iconSize, iconSize, iconBorderInfo.L, iconBorderInfo.R, iconBorderInfo.T, iconBorderInfo.B) @@ -3723,10 +3723,10 @@ function damageClass.PredictedAugSpellsOnEnter(self) local minutes, seconds = math.floor(uptime / 60), math.floor(uptime % 60) if (minutes > 0) then GameCooltip:AddLine(spellName, minutes .. "m " .. seconds .. "s" .. " (" .. format("%.1f", uptimePercent) .. "%)") - Details:AddTooltipBackgroundStatusbar(false, uptimePercent, true, sourceName and "limegreen") + Details:AddTooltipBackgroundStatusbar(false, uptimePercent, true, sourceName and "darkgreen") else GameCooltip:AddLine(spellName, seconds .. "s" .. " (" .. format("%.1f", uptimePercent) .. "%)") - Details:AddTooltipBackgroundStatusbar(false, uptimePercent, true, sourceName and "limegreen") + Details:AddTooltipBackgroundStatusbar(false, uptimePercent, true, sourceName and "darkgreen") end GameCooltip:AddIcon(spellIcon, nil, nil, iconSize, iconSize, iconBorderInfo.L, iconBorderInfo.R, iconBorderInfo.T, iconBorderInfo.B) diff --git a/core/parser.lua b/core/parser.lua index 6138b23d..0dd0ac2d 100755 --- a/core/parser.lua +++ b/core/parser.lua @@ -5784,6 +5784,10 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 if (Details.debug) then end + if (DetailsMythicPlusFrame.ZoneLeftTimer and not DetailsMythicPlusFrame.ZoneLeftTimer:IsCancelled()) then + DetailsMythicPlusFrame.ZoneLeftTimer:Cancel() + end + local zoneName, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceMapID, instanceGroupSize = GetInstanceInfo() if (difficultyID == 8) then Details222.MythicPlus.CHALLENGE_MODE_START_AT = GetTime() diff --git a/functions/mythicdungeon/mythicdungeon.lua b/functions/mythicdungeon/mythicdungeon.lua index 28ef5904..fd58dd51 100644 --- a/functions/mythicdungeon/mythicdungeon.lua +++ b/functions/mythicdungeon/mythicdungeon.lua @@ -335,6 +335,26 @@ function DetailsMythicPlusFrame.EventListener.OnDetailsEvent(contextObject, even end end +local playerLeftDungeonZoneTimer_Callback = function() + if (DetailsMythicPlusFrame.IsDoingMythicDungeon) then + local _, _, difficulty, _, _, _, _, currentZoneID = GetInstanceInfo() + if (currentZoneID ~= Details.MythicPlus.DungeonID) then + Details222.MythicPlus.LogStep("ZONE_CHANGED_NEW_AREA | player has left the dungeon and Details! finished the dungeon because of that.") + + --send mythic dungeon end event + Details:SendEvent("COMBAT_MYTHICDUNGEON_END") --on leave dungeon + + --finish the segment + DetailsMythicPlusFrame.BossDefeated(true) + + --finish the mythic run + DetailsMythicPlusFrame.MythicDungeonFinished(true) + + DetailsMythicPlusFrame.ZoneLeftTimer = nil + end + end +end + DetailsMythicPlusFrame:SetScript("OnEvent", function(_, event, ...) if (event == "START_TIMER") then --DetailsMythicPlusFrame.LastTimer = GetTime() @@ -358,16 +378,17 @@ DetailsMythicPlusFrame:SetScript("OnEvent", function(_, event, ...) print("Zone changed and the zone is different than the dungeon") end - Details222.MythicPlus.LogStep("ZONE_CHANGED_NEW_AREA | player has left the dungeon and Details! finished the dungeon because of that.") + --player left the dungeon zone, start a timer to check if the player will return to the dungeon + if (DetailsMythicPlusFrame.DevelopmentDebug) then + print("Details!", "ZONE_CHANGED_NEW_AREA | player left the dungeon zone, return to dungeon timer started.") + end - --send mythic dungeon end event - Details:SendEvent("COMBAT_MYTHICDUNGEON_END") --on leave dungeon + --check if the timer already exists, if does, ignore this event + if (DetailsMythicPlusFrame.ZoneLeftTimer and not DetailsMythicPlusFrame.ZoneLeftTimer:IsCancelled()) then + return + end - --finish the segment - DetailsMythicPlusFrame.BossDefeated(true) - - --finish the mythic run - DetailsMythicPlusFrame.MythicDungeonFinished(true) + DetailsMythicPlusFrame.ZoneLeftTimer = C_Timer.NewTimer(40, playerLeftDungeonZoneTimer_Callback) end end end