From bf5b3c0dda0bdb61aab02c00c442d460a7ed288e Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Mon, 12 Jun 2023 10:10:48 -0300 Subject: [PATCH] fixed plugins_statusbar error --- Definitions.lua | 1 + core/plugins_statusbar.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Definitions.lua b/Definitions.lua index 2dfa1f12..9eeb1708 100644 --- a/Definitions.lua +++ b/Definitions.lua @@ -41,6 +41,7 @@ ---@field alternate_power table ---@field totals {key1: table, key2: table, key3: table, key3: table} ---@field totals_grupo {key1: table, key2: table, key3: table, key3: table} +---@field __destroyed boolean ---@field GetPhases fun(combat: combat) : table ---@field GetCombatTime fun(combat) : number ---@field GetDeaths fun(combat) : table --get the table which contains the deaths of the combat diff --git a/core/plugins_statusbar.lua b/core/plugins_statusbar.lua index 6ba0a714..71ebbed6 100644 --- a/core/plugins_statusbar.lua +++ b/core/plugins_statusbar.lua @@ -901,7 +901,7 @@ do if (childObject.enabled and instance:IsEnabled()) then ---@type combat local combatObject = instance:GetCombat() - if (combatObject and ((instance:GetSegmentId() ~= DETAILS_SEGMENTID_OVERALL) or (instance:GetSegmentId() == DETAILS_SEGMENTID_OVERALL and not Details.in_combat) or force)) then + if (combatObject and not combatObject.__destroyed and ((instance:GetSegmentId() ~= DETAILS_SEGMENTID_OVERALL) or (instance:GetSegmentId() == DETAILS_SEGMENTID_OVERALL and not Details.in_combat) or force)) then local timeType = childObject.options.timeType if (timeType == 1) then local combatTime = combatObject:GetCombatTime()