From a6f56c46ad6caa883943bebed5658d2c937325e5 Mon Sep 17 00:00:00 2001 From: Tercioo Date: Mon, 11 Mar 2019 21:41:55 -0300 Subject: [PATCH] - Garbage collector won't clear actors in mythic dungeon segments. --- core/control.lua | 7 +++++++ core/meta.lua | 5 +++++ startup.lua | 15 ++++++++++++--- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/core/control.lua b/core/control.lua index a72e9755..68583051 100644 --- a/core/control.lua +++ b/core/control.lua @@ -1355,9 +1355,16 @@ local energy_container = _detalhes.tabela_vigente [3] local misc_container = _detalhes.tabela_vigente [4] + local mythicDungeonRun = _detalhes.tabela_vigente.is_mythic_dungeon_segment + for class_type, container in _ipairs ({damage_container, healing_container}) do for _, actor in _ipairs (container._ActorTable) do + + if (mythicDungeonRun) then + actor.fight_component = true + end + if (actor.grupo) then if (class_type == 1 or class_type == 2) then for target_name, amount in _pairs (actor.targets) do diff --git a/core/meta.lua b/core/meta.lua index b55e33ab..21a03132 100644 --- a/core/meta.lua +++ b/core/meta.lua @@ -860,6 +860,11 @@ --local links_removed = 0 + --do not collect things in a mythic+ dungeon segment + if (_combate.is_mythic_dungeon_trash or _combate.is_mythic_dungeon_run_id or _combate.is_mythic_dungeon_segment) then + return 0 + end + while (_iter.data) do local _actor = _iter.data diff --git a/startup.lua b/startup.lua index 47e6b515..5a3e7d2f 100644 --- a/startup.lua +++ b/startup.lua @@ -790,9 +790,13 @@ function _G._detalhes:Start() local segmentsToMerge = {} --> check if there is trash segments after the last boss. need to merge these segments with the trash segment of the last boss - if (_detalhes.mythic_plus.merge_boss_trash and not self.MythicPlus.IsRestoredState and not fromZoneLeft) then --and false - --> is the current combat not a boss fight? this means a combat was opened after the mythic run completed + if (_detalhes.mythic_plus.merge_boss_trash and not self.MythicPlus.IsRestoredState and not fromZoneLeft) then + --> is the current combat not a boss fight? + --> this mean a combat was opened after the last boss of the dungeon was killed if (not self.tabela_vigente.is_boss and self.tabela_vigente:GetCombatTime() > 5) then + + Details:Debug ("last segment isn't a boss segment, need to merge it with latest trash segment.") + if (newFrame.DevelopmentDebug) then print ("Details!", "MythicDungeonFinished() > the last combat isn't a boss fight, might have trash after bosses done.") end @@ -822,6 +826,7 @@ function _G._detalhes:Start() --> merge this segment tinsert (segmentsToMerge, pastCombat) + Details:Debug ("segment " .. i .. " added to merge after last boss.") if (newFrame.DevelopmentDebug) then print ("MythicDungeonFinished() > found after last boss combat") @@ -832,7 +837,7 @@ function _G._detalhes:Start() end end - if (#segmentsToMerge > 0) then --and false + if (#segmentsToMerge > 0) then if (newFrame.DevelopmentDebug) then print ("Details!", "MythicDungeonFinished() > found ", #segmentsToMerge, "segments after the last boss") end @@ -865,7 +870,11 @@ function _G._detalhes:Start() -- end -- _detalhes.schedule_mythicdungeon_endtrash_merge = true --end + else + Details:Debug ("failed to find the trash overall for the last boss of the dungeon.") end + else + Details:Debug ("no trash segments detected after the last boss in the dungeon.") end --> merge segments