- More improvements on Overall Data.
This commit is contained in:
@@ -116,8 +116,7 @@
|
||||
function combate:GetCombatTime()
|
||||
if (self.end_time) then
|
||||
return _math_max (self.end_time - self.start_time, 0.1)
|
||||
elseif (self.start_time and _detalhes.in_combat) then
|
||||
--return _math_max (_tempo - self.start_time, 0.1)
|
||||
elseif (self.start_time and _detalhes.in_combat and self ~= _detalhes.tabela_overall) then
|
||||
return _math_max (_GetTime() - self.start_time, 0.1)
|
||||
else
|
||||
return 0.1
|
||||
@@ -250,10 +249,10 @@
|
||||
esta_tabela[5].need_refresh = true
|
||||
|
||||
if (_tabela_overall) then --> link é a tabela de combate do overall
|
||||
esta_tabela[1].shadow = _tabela_overall[1] --> diz ao objeto qual a shadow dele na tabela overall
|
||||
esta_tabela[2].shadow = _tabela_overall[2] --> diz ao objeto qual a shadow dele na tabela overall
|
||||
esta_tabela[3].shadow = _tabela_overall[3] --> diz ao objeto qual a shadow dele na tabela overall
|
||||
esta_tabela[4].shadow = _tabela_overall[4] --> diz ao objeto qual a shadow dele na tabela overall
|
||||
esta_tabela[1].shadow = _tabela_overall[1]
|
||||
esta_tabela[2].shadow = _tabela_overall[2]
|
||||
esta_tabela[3].shadow = _tabela_overall[3]
|
||||
esta_tabela[4].shadow = _tabela_overall[4]
|
||||
end
|
||||
|
||||
esta_tabela.totals = {
|
||||
|
||||
@@ -49,10 +49,19 @@ function historico:adicionar_overall (tabela)
|
||||
end
|
||||
|
||||
if (_detalhes.tabela_overall.start_time == 0) then
|
||||
_detalhes.tabela_overall.start_time = tabela.start_time
|
||||
_detalhes.tabela_overall.end_time = tabela.end_time
|
||||
_detalhes.tabela_overall:SetStartTime (tabela.start_time)
|
||||
_detalhes.tabela_overall:SetEndTime (tabela.end_time)
|
||||
else
|
||||
_detalhes.tabela_overall:SetStartTime (tabela.start_time - _detalhes.tabela_overall:GetCombatTime())
|
||||
_detalhes.tabela_overall:SetEndTime (tabela.end_time)
|
||||
end
|
||||
|
||||
if (_detalhes.tabela_overall.data_inicio == 0) then
|
||||
_detalhes.tabela_overall.data_inicio = _detalhes.tabela_vigente.data_inicio or 0
|
||||
end
|
||||
|
||||
_detalhes.tabela_overall:seta_data (_detalhes._detalhes_props.DATA_TYPE_END)
|
||||
|
||||
_detalhes:ClockPluginTickOnSegment()
|
||||
end
|
||||
|
||||
|
||||
+5
-19
@@ -237,12 +237,7 @@
|
||||
_detalhes:Msg ("(debug) started a new combat.")
|
||||
end
|
||||
|
||||
--> não tem historico, addon foi resetado, a primeira tabela é descartada -- Erase first table is do es not have a firts segment history, this occour after reset or first run
|
||||
if (not _detalhes.tabela_historico.tabelas[1]) then
|
||||
--> precisa zerar aqui a tabela overall
|
||||
--_table_wipe (_detalhes.tabela_overall) no more wipes, avoid combat invalid issues
|
||||
--_table_wipe (_detalhes.tabela_vigente)
|
||||
--> aqui ele perdeu o self.showing das instâncias, precisa fazer com que elas atualizem
|
||||
_detalhes.tabela_overall = _detalhes.combate:NovaTabela()
|
||||
|
||||
_detalhes:InstanciaCallFunction (_detalhes.ResetaGump, nil, -1) --> reseta scrollbar, iterators, rodapé, etc
|
||||
@@ -250,16 +245,6 @@
|
||||
_detalhes:InstanciaCallFunction (_detalhes.AtualizaSegmentos) --> atualiza o showing
|
||||
end
|
||||
|
||||
--> conta o tempo na tabela overall -- start time at overall table
|
||||
if (_detalhes.tabela_overall:GetEndTime()) then
|
||||
--_detalhes.tabela_overall:SetStartTime (_tempo - (_detalhes.tabela_overall.end_time - _detalhes.tabela_overall.start_time))
|
||||
_detalhes.tabela_overall:SetStartTime (_GetTime() - _detalhes.tabela_overall:GetCombatTime())
|
||||
_detalhes.tabela_overall:SetEndTime (nil)
|
||||
else
|
||||
--_detalhes.tabela_overall.start_time = _tempo
|
||||
_detalhes.tabela_overall:SetStartTime (_GetTime())
|
||||
end
|
||||
|
||||
--> re-lock nos tempos da tabela passada -- lock again last table times
|
||||
_detalhes.tabela_vigente:TravarTempos() --> lá em cima é feito wipe, não deveria ta dando merda nisso aqui? ou ela puxa da __index e da zero jogadores no mapa e container
|
||||
|
||||
@@ -409,12 +394,13 @@
|
||||
_detalhes.tabela_vigente:TravarTempos()
|
||||
|
||||
--> get waste shields
|
||||
_detalhes:CloseShields (_detalhes.tabela_vigente)
|
||||
if (_detalhes.close_shields) then
|
||||
_detalhes:CloseShields (_detalhes.tabela_vigente)
|
||||
end
|
||||
|
||||
_detalhes.tabela_vigente:seta_data (_detalhes._detalhes_props.DATA_TYPE_END) --> salva hora, minuto, segundo do fim da luta
|
||||
_detalhes.tabela_overall:seta_data (_detalhes._detalhes_props.DATA_TYPE_END) --> salva hora, minuto, segundo do fim da luta
|
||||
--> salva hora, minuto, segundo do fim da luta
|
||||
_detalhes.tabela_vigente:seta_data (_detalhes._detalhes_props.DATA_TYPE_END)
|
||||
_detalhes.tabela_vigente:seta_tempo_decorrido()
|
||||
_detalhes.tabela_overall:seta_tempo_decorrido()
|
||||
|
||||
--> drop last events table to garbage collector
|
||||
_detalhes.tabela_vigente.player_last_events = {}
|
||||
|
||||
+18
-5
@@ -67,6 +67,8 @@
|
||||
_detalhes.refresh:r_container_combatentes (combate [class_type_e_energy])
|
||||
_detalhes.refresh:r_container_combatentes (combate [class_type_misc])
|
||||
|
||||
_detalhes.refresh:r_container_combatentes (combate [5]) --ghost container
|
||||
|
||||
local todos_atributos = {combate [class_type_dano]._ActorTable, combate [class_type_cura]._ActorTable, combate [class_type_e_energy]._ActorTable, combate [class_type_misc]._ActorTable}
|
||||
|
||||
for class_type, atributo in _ipairs (todos_atributos) do
|
||||
@@ -157,12 +159,18 @@
|
||||
--> recupera a meta e indexes da tabela do combate
|
||||
_detalhes.refresh:r_combate (combate, combate_overall)
|
||||
|
||||
--> aumenta o tempo do combate do overall
|
||||
if (combate.end_time and combate.start_time and not overall_saved) then
|
||||
combate_overall.start_time = combate_overall.start_time - (combate.end_time - combate.start_time)
|
||||
end
|
||||
--> aumenta o tempo do combate do overall, seta as datas e os combates armazenados
|
||||
if (not overall_saved and combate.overall_added) then
|
||||
|
||||
if (not overall_saved and combate.overall_added) then
|
||||
if (combate.end_time and combate.start_time) then
|
||||
combate_overall.start_time = combate_overall.start_time - (combate.end_time - combate.start_time)
|
||||
end
|
||||
--
|
||||
if (combate_overall.data_inicio == 0) then
|
||||
combate_overall.data_inicio = combate.data_inicio or 0
|
||||
end
|
||||
combate_overall.data_fim = combate.data_fim or combate_overall.data_fim
|
||||
--
|
||||
if (not _detalhes.tabela_overall.overall_enemy_name) then
|
||||
_detalhes.tabela_overall.overall_enemy_name = combate.is_boss and combate.is_boss.name or combate.enemy
|
||||
else
|
||||
@@ -182,6 +190,11 @@
|
||||
_detalhes.refresh:r_container_combatentes (combate [class_type_e_energy], overall_energy)
|
||||
_detalhes.refresh:r_container_combatentes (combate [class_type_misc], overall_misc)
|
||||
|
||||
--> ghost container
|
||||
if (combate[5]) then
|
||||
_detalhes.refresh:r_container_combatentes (combate [5], combate_overall [5])
|
||||
end
|
||||
|
||||
--> tabela com os 4 tabelas de jogadores
|
||||
local todos_atributos = {combate [class_type_dano]._ActorTable, combate [class_type_cura]._ActorTable, combate [class_type_e_energy]._ActorTable, combate [class_type_misc]._ActorTable}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ do
|
||||
local _, class = _UnitClass (name)
|
||||
|
||||
if (not class) then
|
||||
for _, container in _ipairs (_detalhes.tabela_overall) do
|
||||
for index, container in _ipairs (_detalhes.tabela_overall) do
|
||||
--if (container._NameIndexTable) then
|
||||
local index = container._NameIndexTable [name]
|
||||
if (index) then
|
||||
@@ -146,7 +146,7 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
for _, container in _ipairs (_detalhes.tabela_overall) do
|
||||
for index, container in _ipairs (_detalhes.tabela_overall) do
|
||||
local index = container._NameIndexTable [name]
|
||||
if (index) then
|
||||
local actor = container._ActorTable [index]
|
||||
|
||||
@@ -914,6 +914,7 @@ local default_profile = {
|
||||
overall_clear_newboss = true,
|
||||
overall_clear_newchallenge = true,
|
||||
overall_clear_logout = false,
|
||||
close_shields = false,
|
||||
|
||||
--> skins
|
||||
standard_skin = false,
|
||||
|
||||
@@ -5318,39 +5318,15 @@ local build_segment_list = function (self, elapsed)
|
||||
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_ENEMY"] .. ":", enemy_name, 2, "white", "white")
|
||||
|
||||
if (not _detalhes.tabela_overall:GetEndTime()) then
|
||||
if (_detalhes.in_combat) then
|
||||
local decorrido = _detalhes.tabela_overall:GetCombatTime()
|
||||
local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60)
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
|
||||
else
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", "--x--x--", 2, "white", "white")
|
||||
end
|
||||
else
|
||||
local decorrido = _detalhes.tabela_overall:GetCombatTime()
|
||||
local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60)
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
|
||||
end
|
||||
local combat_time = _detalhes.tabela_overall:GetCombatTime()
|
||||
local minutos, segundos = _math_floor (combat_time / 60), _math_floor (combat_time % 60)
|
||||
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
|
||||
|
||||
CoolTip:SetWallpaper (2, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-StatsBackground]], segments_common_tex, segments_common_color)
|
||||
|
||||
local earlyFight = ""
|
||||
for i = _detalhes.segments_amount, 1, -1 do
|
||||
if (_detalhes.tabela_historico.tabelas [i]) then
|
||||
earlyFight = _detalhes.tabela_historico.tabelas [i].data_inicio
|
||||
break
|
||||
end
|
||||
end
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", earlyFight, 2, "white", "white")
|
||||
|
||||
local lastFight = ""
|
||||
for i = 1, _detalhes.segments_amount do
|
||||
if (_detalhes.tabela_historico.tabelas [i] and _detalhes.tabela_historico.tabelas [i].data_fim ~= 0) then
|
||||
lastFight = _detalhes.tabela_historico.tabelas [i].data_fim
|
||||
break
|
||||
end
|
||||
end
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", lastFight, 2, "white", "white")
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", _detalhes.tabela_overall.data_inicio, 2, "white", "white")
|
||||
CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", _detalhes.tabela_overall.data_fim, 2, "white", "white")
|
||||
|
||||
-- combats added
|
||||
local combats_added = _detalhes.tabela_overall.segments_added or _detalhes.empty_table
|
||||
|
||||
Reference in New Issue
Block a user