From d11f8a1ccd59b36f74dfc40e65a5960289dd0e69 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Thu, 2 Nov 2023 13:59:17 -0300 Subject: [PATCH] Fixed an error during Battlegrounds Stacked heals feature wasn't checking if the previous deathlog event was a healing event as well. --- boot.lua | 4 ++-- classes/container_segments.lua | 7 +++---- core/parser.lua | 4 ++-- frames/window_breakdown/breakdown_spells_spellframes.lua | 2 +- plugins/Details_EncounterDetails/frames.lua | 2 +- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/boot.lua b/boot.lua index 213b9aad..8d2070af 100644 --- a/boot.lua +++ b/boot.lua @@ -13,8 +13,8 @@ local addonName, Details222 = ... local version, build, date, tocversion = GetBuildInfo() - Details.build_counter = 12019 - Details.alpha_build_counter = 12019 --if this is higher than the regular counter, use it instead + Details.build_counter = 12020 + Details.alpha_build_counter = 12020 --if this is higher than the regular counter, use it instead Details.dont_open_news = true Details.game_version = version Details.userversion = version .. " " .. Details.build_counter diff --git a/classes/container_segments.lua b/classes/container_segments.lua index dfc48a3c..f5189020 100644 --- a/classes/container_segments.lua +++ b/classes/container_segments.lua @@ -345,7 +345,7 @@ function Details222.Combat.AddCombat(combatToBeAdded) ---@type table store references of combat objects removed local removedCombats = {} - ---@debug check if there's a destroyed segment within the segment container + --check if there's a destroyed segment within the segment container if (amountSegmentsInUse > 0) then for i = 1, amountSegmentsInUse do local thisCombatObject = segmentsTable[i] @@ -449,7 +449,7 @@ function Details222.Combat.AddCombat(combatToBeAdded) --update the amount of segments in use in case a segment was removed amountSegmentsInUse = #segmentsTable - ---@debug check if there's a destroyed segment within the segment container + -- check if there's a destroyed segment within the segment container if (amountSegmentsInUse > 0) then for i = 1, amountSegmentsInUse do local thisCombatObject = segmentsTable[i] @@ -681,7 +681,7 @@ function segmentClass:AddCombat(combatObject) end end - ---@debug check if there's a destroyed segment within the segment container + --check if there's a destroyed segment within the segment container local segments = Details:GetCombatSegments() if (#segments > 0) then for i = 1, #segments do @@ -691,7 +691,6 @@ function segmentClass:AddCombat(combatObject) end end end - ---@end-debug Details:InstanceCall(function(instanceObject) instanceObject:RefreshCombat() end) diff --git a/core/parser.lua b/core/parser.lua index 457e88e9..dc40f0d1 100755 --- a/core/parser.lua +++ b/core/parser.lua @@ -2546,7 +2546,7 @@ --consolidate if the spellId is the same and the time is the same as well local previousEvent = t[i-1] - if (previousEvent and previousEvent[2] == spellId and floor(previousEvent[4]) == floor(time)) then + if (previousEvent and previousEvent[1] == false and previousEvent[2] == spellId and floor(previousEvent[4]) == floor(time)) then previousEvent[3] = previousEvent[3] + amount if (absorbed) then previousEvent[8] = (previousEvent[8] or 0) + absorbed @@ -2554,7 +2554,7 @@ previousEvent[7] = previousEvent[7] or bIsShield previousEvent[1] = false --true if this is a damage || false for healing previousEvent[5] = UnitHealth(targetName) - previousEvent[11] = (previousEvent[11] or 0) + 1 + previousEvent[11] = (previousEvent[11] or 0) + 1 --attempt to perform arithmetic on a boolean value (during battlegrounds - fix 02 Nov 2023) else local thisEvent = t[i] diff --git a/frames/window_breakdown/breakdown_spells_spellframes.lua b/frames/window_breakdown/breakdown_spells_spellframes.lua index 1d5ec5e0..cb7fd663 100644 --- a/frames/window_breakdown/breakdown_spells_spellframes.lua +++ b/frames/window_breakdown/breakdown_spells_spellframes.lua @@ -1182,7 +1182,7 @@ local refreshSpellsFunc = function(scrollFrame, scrollData, offset, totalLines) nameToUse = bkSpellData.actorName end - ---@debug both calls are equal but the traceback will be different in case of an error + --both calls are equal but the traceback will be different in case of an error if (bIsActorHeader) then updateSpellBar(spellBar, index, nameToUse, combatObject, scrollFrame, headerTable, bkSpellData, spellTableIndex, totalValue, topValue, bIsMainLine, keyToSort, spellTablesAmount) else diff --git a/plugins/Details_EncounterDetails/frames.lua b/plugins/Details_EncounterDetails/frames.lua index e78a4893..14101be8 100644 --- a/plugins/Details_EncounterDetails/frames.lua +++ b/plugins/Details_EncounterDetails/frames.lua @@ -89,7 +89,7 @@ do {value = 5, label = "Auto", onclick = onShowIconCallback, desc = "The plugin decides when the icon needs to be shown."}, } - ---@debug /dump DETAILS_PLUGIN_ENCOUNTER_DETAILS.db.show_icon + --/dump DETAILS_PLUGIN_ENCOUNTER_DETAILS.db.show_icon local menu = { {