The option to remove common segments now also removes trash between raid bosses
This commit is contained in:
@@ -764,12 +764,14 @@ end
|
||||
|
||||
function segmentClass:ResetDataByCombatType(combatType)
|
||||
local bIsException = false
|
||||
local combatTypesInclusion = {}
|
||||
|
||||
if (combatType == "m+overall") then
|
||||
combatType = DETAILS_SEGMENTTYPE_MYTHICDUNGEON_OVERALL
|
||||
bIsException = true
|
||||
elseif (combatType == "generic") then
|
||||
combatType = DETAILS_SEGMENTTYPE_GENERIC
|
||||
combatTypesInclusion[DETAILS_SEGMENTTYPE_GENERIC] = true
|
||||
combatTypesInclusion[DETAILS_SEGMENTTYPE_RAID_TRASH] = true
|
||||
end
|
||||
|
||||
--if true then return end
|
||||
@@ -804,7 +806,7 @@ function segmentClass:ResetDataByCombatType(combatType)
|
||||
for i = #segmentsTable, 2, -1 do
|
||||
---@type combat
|
||||
local thisCombatObject = segmentsTable[i]
|
||||
if (thisCombatObject:GetCombatType() == combatType) then
|
||||
if (combatTypesInclusion[thisCombatObject:GetCombatType()]) then
|
||||
---@type boolean, combat|nil
|
||||
local combatObjectRemoved = table.remove(segmentsTable, i)
|
||||
if (combatObjectRemoved and combatObjectRemoved == thisCombatObject) then
|
||||
@@ -952,7 +954,9 @@ function segmentClass:ResetAllCombatData()
|
||||
end
|
||||
local successful, errortext = pcall(cleargarbage)
|
||||
if (not successful) then
|
||||
Details:Msg("couldn't call collectgarbage()")
|
||||
if (Details.debug) then
|
||||
Details:Msg("couldn't call collectgarbage()")
|
||||
end
|
||||
end
|
||||
else
|
||||
Details.schedule_hard_garbage_collect = true
|
||||
|
||||
Reference in New Issue
Block a user