Skip to content

Commit

Permalink
Set as trash combats not insided mythic+ or boss fights
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Mar 2, 2024
1 parent 703cee3 commit 8ab122b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 36 deletions.
33 changes: 0 additions & 33 deletions classes/container_segments.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
--]]
8 changes: 7 additions & 1 deletion core/control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions core/meta.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 8ab122b

Please sign in to comment.