Fixed an error during Battlegrounds

Stacked heals feature wasn't checking if the previous deathlog event was a healing event as well.
This commit is contained in:
Tercio Jose
2023-11-02 13:59:17 -03:00
parent 21f30af11f
commit d11f8a1ccd
5 changed files with 9 additions and 10 deletions
+2 -2
View File
@@ -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
+3 -4
View File
@@ -345,7 +345,7 @@ function Details222.Combat.AddCombat(combatToBeAdded)
---@type table<combat, boolean> 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)
+2 -2
View File
@@ -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]
@@ -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
+1 -1
View File
@@ -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 = {
{