Skip to content

Commit

Permalink
Fixed an error during Battlegrounds
Browse files Browse the repository at this point in the history
Stacked heals feature wasn't checking if the previous deathlog event was a healing event as well.
  • Loading branch information
Tercioo committed Nov 2, 2023
1 parent 21f30af commit d11f8a1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions classes/container_segments.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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
Expand All @@ -691,7 +691,6 @@ function segmentClass:AddCombat(combatObject)
end
end
end
---@end-debug

Details:InstanceCall(function(instanceObject) instanceObject:RefreshCombat() end)

Expand Down
4 changes: 2 additions & 2 deletions core/parser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2546,15 +2546,15 @@

--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
end
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]

Expand Down
2 changes: 1 addition & 1 deletion frames/window_breakdown/breakdown_spells_spellframes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion plugins/Details_EncounterDetails/frames.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
{
Expand Down

0 comments on commit d11f8a1

Please sign in to comment.