Round of fixes
This commit is contained in:
+43
-37
@@ -598,7 +598,7 @@ end
|
||||
---@param whichRowLine number
|
||||
---@param rankPosition number
|
||||
---@param instance table
|
||||
function atributo_misc:UpdateDeathRow(morte, whichRowLine, rankPosition, instance)
|
||||
function atributo_misc:UpdateDeathRow(morte, whichRowLine, rankPosition, instance) --todo: change this function name
|
||||
morte["dead"] = true
|
||||
local thisRow = instance.barras[whichRowLine]
|
||||
|
||||
@@ -753,8 +753,23 @@ function atributo_misc:RefreshWindow(instance, combatObject, bIsForceRefresh, bI
|
||||
|
||||
local whichRowLine = 1
|
||||
|
||||
--if sort direction is descending, need to invert the values in the table which holds the deaths in the combat
|
||||
if (instance.bars_sort_direction == 1) then
|
||||
local bIsRaidCombat = combatObject:GetCombatType() == DETAILS_SEGMENTTYPE_RAID_BOSS
|
||||
local bIsMythicDungeonOverall = combatObject:IsMythicDungeonOverall()
|
||||
local bIsOverallData = instance:GetSegmentId() == DETAILS_SEGMENTID_OVERALL
|
||||
|
||||
local bReverseDeathLog = false
|
||||
if (bIsRaidCombat and Details.combat_log.inverse_deathlog_raid) then
|
||||
bReverseDeathLog = true
|
||||
|
||||
elseif (bIsMythicDungeonOverall and Details.combat_log.inverse_deathlog_mplus) then
|
||||
bReverseDeathLog = true
|
||||
|
||||
elseif (bIsOverallData and Details.combat_log.inverse_deathlog_overalldata) then
|
||||
bReverseDeathLog = true
|
||||
end
|
||||
|
||||
if (bReverseDeathLog) then
|
||||
--reverse the table
|
||||
local tempTable = {}
|
||||
for i = #allDeathsInTheCombat, 1, -1 do
|
||||
tempTable[#tempTable+1] = allDeathsInTheCombat[i]
|
||||
@@ -779,13 +794,11 @@ function atributo_misc:RefreshWindow(instance, combatObject, bIsForceRefresh, bI
|
||||
|
||||
return _detalhes:EndRefresh(instance, total, combatObject, utilityActorContainer)
|
||||
else
|
||||
|
||||
if (instance.atributo == 5) then --custom
|
||||
--faz o sort da categoria e retorna o amount corrigido
|
||||
table.sort (conteudo, _detalhes.SortIfHaveKey)
|
||||
table.sort(conteudo, Details.SortIfHaveKey)
|
||||
|
||||
--n�o mostrar resultados com zero
|
||||
for i = amount, 1, -1 do --de tr�s pra frente
|
||||
--strip results with zero
|
||||
for i = amount, 1, -1 do
|
||||
if (not conteudo[i][keyName] or conteudo[i][keyName] < 1) then
|
||||
amount = amount - 1
|
||||
else
|
||||
@@ -793,18 +806,15 @@ function atributo_misc:RefreshWindow(instance, combatObject, bIsForceRefresh, bI
|
||||
end
|
||||
end
|
||||
|
||||
--pega o total ja aplicado na tabela do combate
|
||||
total = combatObject.totals [class_type] [keyName]
|
||||
|
||||
--grava o total
|
||||
--get the total done from the combat total data
|
||||
total = combatObject.totals[class_type][keyName]
|
||||
instance.top = conteudo[1][keyName]
|
||||
|
||||
elseif (modo == modo_ALL) then --mostrando ALL
|
||||
table.sort(conteudo, Details.SortIfHaveKey)
|
||||
|
||||
table.sort (conteudo, _detalhes.SortIfHaveKey)
|
||||
|
||||
--n�o mostrar resultados com zero
|
||||
for i = amount, 1, -1 do --de tr�s pra frente
|
||||
--strip results with zero
|
||||
for i = amount, 1, -1 do
|
||||
if (not conteudo[i][keyName] or conteudo[i][keyName] < 1) then
|
||||
amount = amount - 1
|
||||
else
|
||||
@@ -812,20 +822,17 @@ function atributo_misc:RefreshWindow(instance, combatObject, bIsForceRefresh, bI
|
||||
end
|
||||
end
|
||||
|
||||
--pega o total ja aplicado na tabela do combate
|
||||
total = combatObject.totals [class_type] [keyName]
|
||||
|
||||
--grava o total
|
||||
--get the total done from the combat total data
|
||||
total = combatObject.totals[class_type][keyName]
|
||||
instance.top = conteudo[1][keyName]
|
||||
|
||||
elseif (modo == modo_GROUP) then --mostrando GROUP
|
||||
elseif (modo == modo_GROUP) then
|
||||
table.sort(conteudo, Details.SortGroupIfHaveKey)
|
||||
|
||||
--if (refresh_needed) then
|
||||
table.sort (conteudo, _detalhes.SortGroupIfHaveKey)
|
||||
--end
|
||||
for index, player in ipairs(conteudo) do
|
||||
if (player.grupo) then --� um player e esta em grupo
|
||||
if (not player[keyName] or player[keyName] < 1) then --dano menor que 1, interromper o loop
|
||||
if (player.grupo) then --is a player and is in the player group
|
||||
--stop when the amount is zero
|
||||
if (not player[keyName] or player[keyName] < 1) then
|
||||
amount = index - 1
|
||||
break
|
||||
elseif (index == 1) then --esse IF aqui, precisa mesmo ser aqui? n�o daria pra pega-lo com uma chave [1] nad grupo == true?
|
||||
@@ -842,29 +849,28 @@ function atributo_misc:RefreshWindow(instance, combatObject, bIsForceRefresh, bI
|
||||
end
|
||||
end
|
||||
|
||||
--refaz o mapa do container
|
||||
--refresh the container map
|
||||
utilityActorContainer:remapear()
|
||||
|
||||
if (bIsExport) then
|
||||
return total, keyName, instance.top, amount
|
||||
end
|
||||
|
||||
if (amount < 1) then --n�o h� barras para mostrar
|
||||
--check if there's nothing to show
|
||||
if (amount < 1) then
|
||||
instance:EsconderScrollBar() --precisaria esconder a scroll bar
|
||||
return _detalhes:EndRefresh (instance, total, combatObject, utilityActorContainer) --retorna a tabela que precisa ganhar o refresh
|
||||
return Details:EndRefresh(instance, total, combatObject, utilityActorContainer)
|
||||
end
|
||||
|
||||
--estra mostrando ALL ent�o posso seguir o padr�o correto? primeiro, atualiza a scroll bar...
|
||||
instance:RefreshScrollBar (amount)
|
||||
instance:RefreshScrollBar(amount)
|
||||
|
||||
--depois faz a atualiza��o normal dele atrav�s dos_ iterators
|
||||
local whichRowLine = 1
|
||||
local barras_container = instance.barras
|
||||
local percentage_type = instance.row_info.percent_type
|
||||
local bars_show_data = instance.row_info.textR_show_data
|
||||
local bars_brackets = instance:GetBarBracket()
|
||||
local bars_separator = instance:GetBarSeparator()
|
||||
local use_animations = _detalhes.is_using_row_animations and (not instance.baseframe.isStretching and not bIsForceRefresh)
|
||||
local bUseAnimations = _detalhes.is_using_row_animations and (not instance.baseframe.isStretching and not bIsForceRefresh)
|
||||
|
||||
if (total == 0) then
|
||||
total = 0.00000001
|
||||
@@ -875,22 +881,22 @@ function atributo_misc:RefreshWindow(instance, combatObject, bIsForceRefresh, bI
|
||||
|
||||
if (instance.bars_sort_direction == 1) then --top to bottom
|
||||
for i = instance.barraS[1], instance.barraS[2], 1 do --vai atualizar s� o range que esta sendo mostrado
|
||||
conteudo[i]:RefreshLine(instance, barras_container, whichRowLine, i, total, subAttribute, bIsForceRefresh, keyName, nil, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
conteudo[i]:RefreshLine(instance, barras_container, whichRowLine, i, total, subAttribute, bIsForceRefresh, keyName, nil, percentage_type, bUseAnimations, bars_show_data, bars_brackets, bars_separator)
|
||||
whichRowLine = whichRowLine+1
|
||||
end
|
||||
|
||||
elseif (instance.bars_sort_direction == 2) then --bottom to top
|
||||
for i = instance.barraS[2], instance.barraS[1], -1 do --vai atualizar s� o range que esta sendo mostrado
|
||||
if (conteudo[i]) then
|
||||
conteudo[i]:RefreshLine(instance, barras_container, whichRowLine, i, total, subAttribute, bIsForceRefresh, keyName, nil, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
conteudo[i]:RefreshLine(instance, barras_container, whichRowLine, i, total, subAttribute, bIsForceRefresh, keyName, nil, percentage_type, bUseAnimations, bars_show_data, bars_brackets, bars_separator)
|
||||
whichRowLine = whichRowLine+1
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
if (use_animations) then
|
||||
instance:PerformAnimations (whichRowLine-1)
|
||||
if (bUseAnimations) then
|
||||
instance:PerformAnimations(whichRowLine-1)
|
||||
end
|
||||
|
||||
if (instance.atributo == 5) then --custom
|
||||
|
||||
Reference in New Issue
Block a user