- Report lines for deaths is now inverted. No need to scroll up the chat to see the cause of death anymore.

Fixed some annoyances with auto current feature where it was changing the segments even when the user were using the window.
This commit is contained in:
Tercio
2015-04-14 18:44:47 -03:00
parent cce268fc36
commit c30e2312b7
13 changed files with 118 additions and 45 deletions
+7 -1
View File
@@ -1825,6 +1825,10 @@ end
------------------------------------------------------------------------------------------------------------------------
function _detalhes:CheckSwitchToCurrent()
if (DetailsReportWindow and DetailsReportWindow:IsShown()) then
_detalhes.delay_CheckSwitchToCurrent = true
return
end
for _, instance in _ipairs (_detalhes.tabela_instancias) do
if (instance.ativa and instance.baseframe and instance.segmento ~= 0 and instance.auto_current) then
instance:TrocaTabela (0) --> muda o segmento pra current
@@ -1897,7 +1901,7 @@ function _detalhes:AtualizaSegmentos_AfterCombat (instancia, historico)
local segmento = instancia.segmento
local _fadeType, _fadeSpeed = _unpack (_detalhes.row_fade_in)
if (segmento == _detalhes.segments_amount) then --> significa que o index [5] passou a ser [6] com a entrada da nova tabela
instancia.showing = historico.tabelas [_detalhes.segments_amount] --> então ele volta a pegar o index [5] que antes era o index [4]
@@ -1906,6 +1910,7 @@ function _detalhes:AtualizaSegmentos_AfterCombat (instancia, historico)
instancia.v_barras = true
instancia:ResetaGump()
instancia:AtualizaGumpPrincipal (true)
_detalhes:AtualizarJanela (instancia)
elseif (segmento < _detalhes.segments_amount and segmento > 0) then
instancia.showing = historico.tabelas [segmento]
@@ -1915,6 +1920,7 @@ function _detalhes:AtualizaSegmentos_AfterCombat (instancia, historico)
instancia.v_barras = true
instancia:ResetaGump()
instancia:AtualizaGumpPrincipal (true)
_detalhes:AtualizarJanela (instancia)
end
end
+31 -10
View File
@@ -312,8 +312,27 @@ end
--[1] tabela [2] time [3] nome [4] classe [5] maxhealth [6] time of death
--[1] true damage/ false heal [2] spellid [3] amount [4] time [5] current health [6] source
local report_table = {}
local ReportSingleDeathFunc = function (IsCurrent, IsReverse, AmtLines)
AmtLines = AmtLines + 1
local t = {}
for i = 1, _math_min (#report_table, AmtLines) do
local table = report_table [i]
t [#t+1] = table [1] .. table [4] .. table [2] .. table [3]
end
local title = tremove (t, 1)
t = _detalhes.table.reverse (t)
tinsert (t, 1, title)
_detalhes:SendReportLines (t)
end
function atributo_misc:ReportSingleDeadLine (morte, instancia)
--
local barra = instancia.barras [morte.minha_barra]
local max_health = morte [5]
@@ -333,11 +352,11 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia)
end
local default_len = _detalhes.fontstring_len:GetStringWidth()
local reportar = {"Details! " .. Loc ["STRING_REPORT_SINGLE_DEATH"] .. " " .. morte [3] .. " " .. Loc ["STRING_ACTORFRAME_REPORTAT"] .. " " .. morte [6]}
wipe (report_table)
local report_array = report_table
report_array[1] = {"Details! " .. Loc ["STRING_REPORT_SINGLE_DEATH"] .. " " .. morte [3] .. " " .. Loc ["STRING_ACTORFRAME_REPORTAT"] .. " " .. morte [6], "", "", ""}
local report_array = {}
for index, evento in _ipairs (morte [1]) do
for index, evento in _ipairs (_detalhes.table.reverse (morte [1])) do
if (evento [1] and type (evento [1]) == "boolean") then --> damage
if (evento [3]) then
local elapsed = _cstr ("%.1f", evento [4] - time_of_death) .."s"
@@ -381,16 +400,18 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia)
end
end
for index = #report_array, 1, -1 do
local table = report_array [index]
reportar [#reportar+1] = table [1] .. table [4] .. table [2] .. table [3]
end
_detalhes:SendReportWindow (ReportSingleDeathFunc, nil, nil, true)
--for index = #report_array, 1, -1 do
-- local table = report_array [index]
-- reportar [#reportar+1] = table [1] .. table [4] .. table [2] .. table [3]
--end
--for index, table in _ipairs (report_array) do
-- reportar [#reportar+1] = table [1] .. table [4] .. table [2] .. table [3]
--end
return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true})
--return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true})
end
function atributo_misc:ReportSingleCooldownLine (misc_actor, instancia)
+6 -3
View File
@@ -35,7 +35,11 @@ function historico:adicionar_overall (tabela)
--> store the segments added to the overall data
_detalhes.tabela_overall.segments_added = _detalhes.tabela_overall.segments_added or {}
tinsert (_detalhes.tabela_overall.segments_added, {name = tabela:GetCombatName (true), elapsed = tabela:GetCombatTime(), clock = tabela:GetDate()[1]})
tinsert (_detalhes.tabela_overall.segments_added, 1, {name = tabela:GetCombatName (true), elapsed = tabela:GetCombatTime(), clock = tabela:GetDate()[1]})
if (#_detalhes.tabela_overall.segments_added > 20) then
tremove (_detalhes.tabela_overall.segments_added, 21)
end
_detalhes.tabela_overall = _detalhes.tabela_overall + tabela
tabela.overall_added = true
@@ -291,8 +295,7 @@ function historico:adicionar (tabela)
--> chama a função que irá atualizar as instâncias com segmentos no histórico
_detalhes:InstanciaCallFunction (_detalhes.AtualizaSegmentos_AfterCombat, self)
_detalhes:InstanciaCallFunction (_detalhes.AtualizarJanela)
--_detalhes:InstanciaCallFunction (_detalhes.AtualizarJanela)
end
--> verifica se tem alguma instancia congelada mostrando o segmento recém liberado