Fixed an issue with Min and Max spell values of nested spells

This commit is contained in:
Tercio Jose
2023-05-18 12:01:51 -03:00
parent 446c4e7a75
commit b235a3a547
3 changed files with 21 additions and 3 deletions
+13 -3
View File
@@ -2579,11 +2579,21 @@ local refreshSpellsFunc = function(scrollFrame, scrollData, offset, totalLines)
if (mainSpellBar) then
lineIndex = lineIndex + 1
local bIsMainLine = true
local bIsActorHeader = bkSpellData.bIsActorHeader
local spellTableIndex = 1
local spellBar = mainSpellBar
if (bkSpellData.bIsActorHeader) then
updateSpellBar(mainSpellBar, index, bkSpellData.actorName, combatObject, scrollFrame, headerTable, bkSpellData, 1, totalValue, topValue, bIsMainLine, keyToSort, spellTablesAmount)
local nameToUse = actorName
if (bIsActorHeader) then
nameToUse = bkSpellData.actorName
end
---@debug 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
updateSpellBar(mainSpellBar, index, actorName, combatObject, scrollFrame, headerTable, bkSpellData, 1, totalValue, topValue, bIsMainLine, keyToSort, spellTablesAmount)
--here
updateSpellBar(spellBar, index, nameToUse, combatObject, scrollFrame, headerTable, bkSpellData, spellTableIndex, totalValue, topValue, bIsMainLine, keyToSort, spellTablesAmount)
end
end
end