From 8ab122bf4f954a05b52083687e313b28a89e2d4f Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Fri, 1 Mar 2024 22:36:26 -0300 Subject: [PATCH] Set as trash combats not insided mythic+ or boss fights --- classes/container_segments.lua | 33 --------------------------------- core/control.lua | 8 +++++++- core/meta.lua | 3 +-- 3 files changed, 8 insertions(+), 36 deletions(-) diff --git a/classes/container_segments.lua b/classes/container_segments.lua index 7ad3c219a..64077f68f 100644 --- a/classes/container_segments.lua +++ b/classes/container_segments.lua @@ -993,36 +993,3 @@ function Details.refresh:r_historico(este_historico) setmetatable(este_historico, segmentClass) --este_historico.__index = historico end - ---[[ - elseif (_detalhes.trash_concatenate) then - - if (true) then - return - end - - if (_terceiro_combate) then - if (_terceiro_combate.is_trash and _segundo_combate.is_trash and not _terceiro_combate.is_boss and not _segundo_combate.is_boss) then - --tabela 2 deve ser deletada e somada a tabela 1 - if (_detalhes.debug) then - detalhes:Msg("(debug) concatenating two trash segments.") - end - - _segundo_combate = _segundo_combate + _terceiro_combate - _detalhes.tabela_overall = _detalhes.tabela_overall - _terceiro_combate - - _segundo_combate.is_trash = true - - --verificar novamente a time machine - for _, jogador in ipairs(_terceiro_combate [1]._ActorTable) do --damage - Details222.TimeMachine.RemoveActor(jogador) - end - for _, jogador in ipairs(_terceiro_combate [2]._ActorTable) do --heal - Details222.TimeMachine.RemoveActor(jogador) - end - --remover - _table_remove(self.tabelas, 3) - _detalhes:SendEvent("DETAILS_DATA_SEGMENTREMOVED", nil, nil) - end - end ---]] diff --git a/core/control.lua b/core/control.lua index 7624821fe..48c1c1366 100644 --- a/core/control.lua +++ b/core/control.lua @@ -622,17 +622,23 @@ --if this segment isn't a boss fight if (not currentCombat.is_boss) then + --is arena or battleground if (currentCombat.is_pvp or currentCombat.is_arena) then Details:FlagActorsOnPvPCombat() end + --is arena if (currentCombat.is_arena) then currentCombat.enemy = "[" .. ARENA .. "] " .. currentCombat.is_arena.name end + --check if the player is in a instance local bInInstance = IsInInstance() --garrison returns party as instance type. if ((instanceType == "party" or instanceType == "raid") and bInInstance) then - currentCombat.is_trash = true + --if is not boss and inside a instance of type party or raid: mark the combat as trash + if (not currentCombat.is_mythic_dungeon) then + currentCombat.is_trash = true + end else if (not bInInstance) then if (Details.world_combat_is_trash) then diff --git a/core/meta.lua b/core/meta.lua index 060db5be6..2b81a0630 100644 --- a/core/meta.lua +++ b/core/meta.lua @@ -86,8 +86,7 @@ local classTypeUtility = Details.atributos.misc end end - --restore actor containers indexes e metatables - function Details:RestoreMetatables() --called from Details222.LoadSavedVariables.CombatSegments() + function Details:RestoreMetatables() --called from Details222.LoadSavedVariables.CombatSegments() --restore actor containers indexes e metatables --pet table setmetatable(Details.tabela_pets, Details.container_pets)