From 28255ac7d0c185e0e68079fe094dfeb6738a0487 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Fri, 23 Jun 2023 15:25:39 -0300 Subject: [PATCH] Overall segment load fix --- core/parser.lua | 6 +++--- functions/loaddata.lua | 15 +++------------ functions/savedata.lua | 2 -- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/core/parser.lua b/core/parser.lua index b62b012d..33d85ab7 100755 --- a/core/parser.lua +++ b/core/parser.lua @@ -5724,12 +5724,12 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 --load up data from saved variables for the account (shared among all the players' characters; this is not the Blizzard account, lol). Details222.LoadSavedVariables.SharedData() - --load the profiles - Details:LoadConfig() - --load data of the segments saved from latest game session Details222.LoadSavedVariables.CombatSegments() + --load the profiles + Details:LoadConfig() + Details:UpdateParserGears() --load auto run code diff --git a/functions/loaddata.lua b/functions/loaddata.lua index 2cebf6e8..b9688e18 100644 --- a/functions/loaddata.lua +++ b/functions/loaddata.lua @@ -167,21 +167,12 @@ function Details222.LoadSavedVariables.CombatSegments() --restore saved overall data do - if (not Details.overall_clear_logout) then - if (currentCharacterData.tabela_overall) then - Details.tabela_overall = Details.CopyTable(currentCharacterData.tabela_overall) - Details:RestoreOverallMetatables() - else - Details.tabela_overall = Details.combate:NovaTabela() - end + if (currentCharacterData.tabela_overall) then + Details.tabela_overall = Details.CopyTable(currentCharacterData.tabela_overall) + Details:RestoreOverallMetatables() else Details.tabela_overall = Details.combate:NovaTabela() end - - if (currentCharacterData.tabela_overall) then - Details:Destroy(currentCharacterData.tabela_overall) - currentCharacterData.tabela_overall = nil - end end --restore saved segments diff --git a/functions/savedata.lua b/functions/savedata.lua index 6abc9cae..17eef61d 100644 --- a/functions/savedata.lua +++ b/functions/savedata.lua @@ -90,12 +90,10 @@ function Details:SaveConfig() if (Details.overall_clear_logout) then if (_detalhes_database.tabela_overall) then - Details:Destroy(_detalhes_database.tabela_overall) _detalhes_database.tabela_overall = nil end else _detalhes_database.tabela_overall = Details.tabela_overall - --did it prepared the overall table for save? end local name, instanceType = GetInstanceInfo()