From 3376f9b1b5cbdd067cd2ed16f1d54f68bf41a8d6 Mon Sep 17 00:00:00 2001 From: Tercio Date: Fri, 20 Feb 2015 16:44:15 -0200 Subject: [PATCH] - More improvements on Overall Data. --- boot.lua | 4 ++-- classes/classe_combate.lua | 11 +++++----- classes/container_historico.lua | 13 ++++++++++-- core/control.lua | 24 +++++----------------- core/meta.lua | 23 ++++++++++++++++----- functions/playerclass.lua | 4 ++-- functions/profiles.lua | 1 + gumps/janela_principal.lua | 36 ++++++--------------------------- 8 files changed, 50 insertions(+), 66 deletions(-) diff --git a/boot.lua b/boot.lua index cc842fff..5409fef4 100644 --- a/boot.lua +++ b/boot.lua @@ -4,7 +4,7 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") _detalhes.build_counter = 570 --it's 570 for release - _detalhes.userversion = "v3.10.2" + _detalhes.userversion = "v3.10.3" _detalhes.realversion = 61 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" @@ -31,7 +31,7 @@ do -- |cFFFFFF00v3.10.2 (|cFFFFCC00Feb 20, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): several bug fixes and improvements.\n\n|cFFFFFF00-|r Encounter Details (plugin): added new tab showing enemy spells from the encounter with an aura creation panel.\n\n|cFFFFFF00-|r Encounter Details (plugin): added phase indicators on graphic tab, hovering over shows the damage and heal for that specific phase.\n\n|cFFFFFF00-|r Several improvements on Overall Data, also, now it has an option to not save it when the character logoff.\n\n|cFFFFFF00-|r Player Details window now closes with right click on any bar.\n\n|cFFFFFF00-|r Fixed Nature's Vigil cooldown.\n\n - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.10.2 (|cFFFFCC00Feb 20, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): several bug fixes and improvements.\n\n|cFFFFFF00-|r Encounter Details (plugin): added new tab showing enemy spells from the encounter with an aura creation panel.\n\n|cFFFFFF00-|r Encounter Details (plugin): added phase indicators on graphic tab, hovering over shows the damage and heal for that specific phase.\n\n|cFFFFFF00-|r Several improvements on Overall Data, also, now it has an option to not save it when the character logoff.\n\n|cFFFFFF00-|r Player Details window now closes with right click on any bar.\n\n|cFFFFFF00-|r Fixed Nature's Vigil cooldown.\n\n|cFFFFFF00v3.9.12a (|cFFFFCC00Feb 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Roll back on combat detection after reset data, might be causing problems.\n\n|cFFFFFF00v3.9.12 (|cFFFFCC00Feb 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): got report buttons for Endurance and Deaths Overall Damage.\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): the Deaths and Endurance limits can now be changed under the plugin options.\n\n|cFFFFFF00-|r Chart Viewer (plugin): has been revamped and now it's less complicated to use.\n\n|cFFFFFF00-|r Time Line (plugin): added options to change the background color and scale.\n\n|cFFFFFF00-|r Raid Check (plugin): its window is now 'always on top'.\n\n|cFFFFFF00-|r Accuracy adjustments on overheal of Divine Aegis and Illuminated Healing.\n\n|cFFFFFF00-|r Removed healthstone from cooldown list, added Nature's Vigil.\n\n|cFFFFFF00-|r Enemies display now shows damage taken instead of damage done.\n\n|cFFFFFF00-|r Tooltip for enemies display now also show damage and healing done by the enemy.\n\n|cFFFFFF00-|r Added an option under miscellaneous to show neutral and hostile creatures on damage taken display.\n\n|cFFFFFF00-|r Added an option to ignore nicknames and always use character names.\n\n|cFFFFFF00-|r Enabling the display icon on title bar now makes the title text automatically move slightly to right.\n\n|cFFFFFF00-|r Fixed issue with skin changing when the window has the statusbar enabled.\n\n|cFFFFFF00v3.9.4 (|cFFFFCC00Feb 03, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added option 'Ignore Mass Toggle', when enabled the window won't be affected when hiding, showing or toggling all windows.\n\n|cFFFFFF00-|r Added window number for slash commands 'hide', 'show' and 'toggle'. Usage: '/details hide 1' to hide window 1.\n\n|cFFFFFF00-|r Removed keybinds for Open and Close, added toggle instead.\n\n|cFFFFFF00-|r Added slash command 'toggle'.\n\n|cFFFFFF00-|r Added display icons for all skins which still didn't have they.\n\n|cFFFFFF00-|r Improved 'Align with right chat' tool, now it also supports Forced Square skin.\n\n|cFFFFFF00-|r Improvements on Bookmark panel.\n\n|cFFFFFF00-|r Improvements on spec icons with transparency.\n\n|cFFFFFF00-|r Created custom spell for Living Bomb explosion.\n\n|cFFFFFF00-|r Fixed statusbar textures and mini displays.\n\n|cFFFFFF00-|r Fixed an issue with title bar buttons when toggling the titlebar anchor from bottom to top position.\n\n|cFFFFFF00-|r Fixed an issue with title bar text when toggling the statusbar position from bottom to top.\n\n|cFFFFFF00-|r Fixed yet another bug with avoidance tab on player detail window.\n\n|cFFFFFF00-|r Fixed the window ungroup button (above the resize one).\n\n|cFFFFFF00v3.8.13 (|cFFFFCC00Jan 26, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r RaidCheck (plugin): added an option to be able to use the report panel.\n\n|cFFFFFF00-|r You Are Not Prepared (plugin): added Auto Close the window, can be disabled through its options panel.\n\n|cFFFFFF00-|r Vanguard (plugin): Added Options Panel.\n\n|cFFFFFF00-|r Details! is now using 'LibWindow-1.1' to save and restore the positioning of the windows, bug might appear, please report if something weird happen.\n\n|cFFFFFF00-|r Improved specialization detection in order to try detect spec changes.\n\n|cFFFFFF00-|r Added options to change the brackets and the separator for dps/percent block.\n\n|cFFFFFF00-|r Added options for show (or hide) totals, dps and percent amount.\n\n|cFFFFFF00-|r Added Segments shortcut menu pressing Shift + Right click.\n\n|cFFFFFF00-|r Fixed positioning after reopen a window previously closed on last logon.\n\n|cFFFFFF00-|r Fixed enemies display where sometimes the bars were black instead of red.\n\n|cFFFFFF00-|r Fixed few places where spec icons wasn't being used on.\n\n|cFFFFFF00-|r Fixed avoidance panel on Player Details Window where sometimes was giving errors.\n\n|cFFFFFF00-|r Fixed priest shadow and holy detection.\n\n|cFFFFFF00-|r Fixed blood and unholy spec icons.\n\n|cFFFFFF00-|r Fixed an issue with 'Always Show me' feature where it was showing the player on Enemies display.\n\n|cFFFFFF00v3.8.1 (|cFFFFCC00Jan 17, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin Vanguard: got full rewrite and now it is more easy to use.\n\n|cFFFFFF00-|r Plugin TimeAttack: fixed problem where sometimes required a reload to start a new time.\n\n|cFFFFFF00-|r Plugin Damage the Game!: fixed a problem where sometimes the time didn't started after level 2.\n\n|cFFFFFF00-|r Added specialization icons.\n\n|cFFFFFF00-|r Fixed Auto-Hide where it wasn't hiding the wallpaper of the window.\n\n|cFFFFFF00-|r Added 'Editing Group' check box on option panel, when enabled, settings changed also are modified on all windows in the group.\n\n|cFFFFFF00-|r Changing window's skin, doesn't change any more settings not related with appearance, for example, Auto-Hide, Switches.\n\n|cFFFFFF00-|r Custom display 'Health Potion & Stone' now also track Healing Tonic.\n\n|cFFFFFF00-|r Custom display 'Damage Taken by Spell' now tracks more spells and also melee hits.\n\n|cFFFFFF00-|r Menus now uses 'Friz Quadrata TT' font as default, also added an option to change it on options panel -> miscellaneous.\n\n|cFFFFFF00-|r 'Switch to Current' feature now switches all windows which have this option enabled.\n\n|cFFFFFF00-|r The message telling to use '/details reinstall' now only shows if a problem happen during the addon load process.\n\n|cFFFFFF00-|r Segments Saved option now can be set to 25, up from 5.\n\n|cFFFFFF00-|r Attempt to fix the bug with the monk spell 'Storm, Earth, and Fire'.\n\n|cFFFFFF00-|r Fixed 'Icon Pick' panel.\n\n|cFFFFFF00-|r Fixed bug when reporting friendly fire through player detail window.\n\n|cFFFFFF00-|r Fixed bug with report window where sometimes it was reporting on a wrong channel.\n\n|cFFFFFF00v3.7.1 (|cFFFFCC00Jan 08, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin 'Damage Rank': is now called 'Damage, the Game!' and had its levels adjusted for WoD.\n\n|cFFFFFF00-|r Plugin 'Tiny Threat': fixed player name where it was showing the realm name too.\n\n|cFFFFFF00-|r Plugin 'Vanguard': fixed frame details (clicking on a bar) shown behind the Vanguard panel.\n\n|cFFFFFF00-|r Plugin 'Vanguard': fixed a problem when clicking with right button wasn't opening the bookmark panel.\n\n|cFFFFFF00-|r Plugin 'Vanguard': incoming heals now count shield amount on the player too.\n\n|cFFFFFF00-|r Plugin 'Vanguard' Known Bug: incoming damage and melee vs avoidance seems to be inaccurate by now, we need more time to study and fix it.\n\n|cFFFFFF00-|r Added Twins Ogron's Charge as custom spells, one for the charge by him self and other for the copies (mythic only).\n\n|cFFFFFF00-|r Added option panel for Raid Check plugin.\n\n|cFFFFFF00-|r Added key bindings for open a window, close a window and select a bookmark." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.10.3 (|cFFFFCC00Feb 20, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): several bug fixes and improvements.\n\n|cFFFFFF00-|r Encounter Details (plugin): added new tab showing enemy spells from the encounter with an aura creation panel.\n\n|cFFFFFF00-|r Encounter Details (plugin): added phase indicators on graphic tab, hovering over shows the damage and heal for that specific phase.\n\n|cFFFFFF00-|r Several improvements on Overall Data, also, now it has an option to not save it when the character logoff.\n\n|cFFFFFF00-|r Player Details window now closes with right click on any bar.\n\n|cFFFFFF00-|r Fixed Nature's Vigil cooldown.\n\n|cFFFFFF00v3.9.12a (|cFFFFCC00Feb 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Roll back on combat detection after reset data, might be causing problems.\n\n|cFFFFFF00v3.9.12 (|cFFFFCC00Feb 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): got report buttons for Endurance and Deaths Overall Damage.\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): the Deaths and Endurance limits can now be changed under the plugin options.\n\n|cFFFFFF00-|r Chart Viewer (plugin): has been revamped and now it's less complicated to use.\n\n|cFFFFFF00-|r Time Line (plugin): added options to change the background color and scale.\n\n|cFFFFFF00-|r Raid Check (plugin): its window is now 'always on top'.\n\n|cFFFFFF00-|r Accuracy adjustments on overheal of Divine Aegis and Illuminated Healing.\n\n|cFFFFFF00-|r Removed healthstone from cooldown list, added Nature's Vigil.\n\n|cFFFFFF00-|r Enemies display now shows damage taken instead of damage done.\n\n|cFFFFFF00-|r Tooltip for enemies display now also show damage and healing done by the enemy.\n\n|cFFFFFF00-|r Added an option under miscellaneous to show neutral and hostile creatures on damage taken display.\n\n|cFFFFFF00-|r Added an option to ignore nicknames and always use character names.\n\n|cFFFFFF00-|r Enabling the display icon on title bar now makes the title text automatically move slightly to right.\n\n|cFFFFFF00-|r Fixed issue with skin changing when the window has the statusbar enabled.\n\n|cFFFFFF00v3.9.4 (|cFFFFCC00Feb 03, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added option 'Ignore Mass Toggle', when enabled the window won't be affected when hiding, showing or toggling all windows.\n\n|cFFFFFF00-|r Added window number for slash commands 'hide', 'show' and 'toggle'. Usage: '/details hide 1' to hide window 1.\n\n|cFFFFFF00-|r Removed keybinds for Open and Close, added toggle instead.\n\n|cFFFFFF00-|r Added slash command 'toggle'.\n\n|cFFFFFF00-|r Added display icons for all skins which still didn't have they.\n\n|cFFFFFF00-|r Improved 'Align with right chat' tool, now it also supports Forced Square skin.\n\n|cFFFFFF00-|r Improvements on Bookmark panel.\n\n|cFFFFFF00-|r Improvements on spec icons with transparency.\n\n|cFFFFFF00-|r Created custom spell for Living Bomb explosion.\n\n|cFFFFFF00-|r Fixed statusbar textures and mini displays.\n\n|cFFFFFF00-|r Fixed an issue with title bar buttons when toggling the titlebar anchor from bottom to top position.\n\n|cFFFFFF00-|r Fixed an issue with title bar text when toggling the statusbar position from bottom to top.\n\n|cFFFFFF00-|r Fixed yet another bug with avoidance tab on player detail window.\n\n|cFFFFFF00-|r Fixed the window ungroup button (above the resize one).\n\n|cFFFFFF00v3.8.13 (|cFFFFCC00Jan 26, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r RaidCheck (plugin): added an option to be able to use the report panel.\n\n|cFFFFFF00-|r You Are Not Prepared (plugin): added Auto Close the window, can be disabled through its options panel.\n\n|cFFFFFF00-|r Vanguard (plugin): Added Options Panel.\n\n|cFFFFFF00-|r Details! is now using 'LibWindow-1.1' to save and restore the positioning of the windows, bug might appear, please report if something weird happen.\n\n|cFFFFFF00-|r Improved specialization detection in order to try detect spec changes.\n\n|cFFFFFF00-|r Added options to change the brackets and the separator for dps/percent block.\n\n|cFFFFFF00-|r Added options for show (or hide) totals, dps and percent amount.\n\n|cFFFFFF00-|r Added Segments shortcut menu pressing Shift + Right click.\n\n|cFFFFFF00-|r Fixed positioning after reopen a window previously closed on last logon.\n\n|cFFFFFF00-|r Fixed enemies display where sometimes the bars were black instead of red.\n\n|cFFFFFF00-|r Fixed few places where spec icons wasn't being used on.\n\n|cFFFFFF00-|r Fixed avoidance panel on Player Details Window where sometimes was giving errors.\n\n|cFFFFFF00-|r Fixed priest shadow and holy detection.\n\n|cFFFFFF00-|r Fixed blood and unholy spec icons.\n\n|cFFFFFF00-|r Fixed an issue with 'Always Show me' feature where it was showing the player on Enemies display.\n\n|cFFFFFF00v3.8.1 (|cFFFFCC00Jan 17, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin Vanguard: got full rewrite and now it is more easy to use.\n\n|cFFFFFF00-|r Plugin TimeAttack: fixed problem where sometimes required a reload to start a new time.\n\n|cFFFFFF00-|r Plugin Damage the Game!: fixed a problem where sometimes the time didn't started after level 2.\n\n|cFFFFFF00-|r Added specialization icons.\n\n|cFFFFFF00-|r Fixed Auto-Hide where it wasn't hiding the wallpaper of the window.\n\n|cFFFFFF00-|r Added 'Editing Group' check box on option panel, when enabled, settings changed also are modified on all windows in the group.\n\n|cFFFFFF00-|r Changing window's skin, doesn't change any more settings not related with appearance, for example, Auto-Hide, Switches.\n\n|cFFFFFF00-|r Custom display 'Health Potion & Stone' now also track Healing Tonic.\n\n|cFFFFFF00-|r Custom display 'Damage Taken by Spell' now tracks more spells and also melee hits.\n\n|cFFFFFF00-|r Menus now uses 'Friz Quadrata TT' font as default, also added an option to change it on options panel -> miscellaneous.\n\n|cFFFFFF00-|r 'Switch to Current' feature now switches all windows which have this option enabled.\n\n|cFFFFFF00-|r The message telling to use '/details reinstall' now only shows if a problem happen during the addon load process.\n\n|cFFFFFF00-|r Segments Saved option now can be set to 25, up from 5.\n\n|cFFFFFF00-|r Attempt to fix the bug with the monk spell 'Storm, Earth, and Fire'.\n\n|cFFFFFF00-|r Fixed 'Icon Pick' panel.\n\n|cFFFFFF00-|r Fixed bug when reporting friendly fire through player detail window.\n\n|cFFFFFF00-|r Fixed bug with report window where sometimes it was reporting on a wrong channel.\n\n|cFFFFFF00v3.7.1 (|cFFFFCC00Jan 08, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin 'Damage Rank': is now called 'Damage, the Game!' and had its levels adjusted for WoD.\n\n|cFFFFFF00-|r Plugin 'Tiny Threat': fixed player name where it was showing the realm name too.\n\n|cFFFFFF00-|r Plugin 'Vanguard': fixed frame details (clicking on a bar) shown behind the Vanguard panel.\n\n|cFFFFFF00-|r Plugin 'Vanguard': fixed a problem when clicking with right button wasn't opening the bookmark panel.\n\n|cFFFFFF00-|r Plugin 'Vanguard': incoming heals now count shield amount on the player too.\n\n|cFFFFFF00-|r Plugin 'Vanguard' Known Bug: incoming damage and melee vs avoidance seems to be inaccurate by now, we need more time to study and fix it.\n\n|cFFFFFF00-|r Added Twins Ogron's Charge as custom spells, one for the charge by him self and other for the copies (mythic only).\n\n|cFFFFFF00-|r Added option panel for Raid Check plugin.\n\n|cFFFFFF00-|r Added key bindings for open a window, close a window and select a bookmark." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/classes/classe_combate.lua b/classes/classe_combate.lua index d387e69c..62c4b71b 100644 --- a/classes/classe_combate.lua +++ b/classes/classe_combate.lua @@ -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 = { diff --git a/classes/container_historico.lua b/classes/container_historico.lua index e0b719d2..d7d17fd8 100644 --- a/classes/container_historico.lua +++ b/classes/container_historico.lua @@ -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 diff --git a/core/control.lua b/core/control.lua index 8336cb4f..047fb3a0 100644 --- a/core/control.lua +++ b/core/control.lua @@ -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 = {} diff --git a/core/meta.lua b/core/meta.lua index c4637f9a..d45eea53 100644 --- a/core/meta.lua +++ b/core/meta.lua @@ -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} diff --git a/functions/playerclass.lua b/functions/playerclass.lua index 9e219613..7d1bf1b1 100644 --- a/functions/playerclass.lua +++ b/functions/playerclass.lua @@ -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] diff --git a/functions/profiles.lua b/functions/profiles.lua index 4ccb2ea7..76f32f3f 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -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, diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index 83dd0343..a0ce255e 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -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