From 4f6f24ea0415935c23c0ea57268700cd5cccd938 Mon Sep 17 00:00:00 2001 From: Tercio Date: Sat, 30 May 2015 17:28:10 -0300 Subject: [PATCH] - Activity time now has only 3 seconds inactivity tolerance on battlegrounds and arenas. - Effective time will automatically be used when inside a battleground and using sync from the score board. - Added 'hide all' option on the minimap menu. --- boot.lua | 13 +++- classes/container_combatentes.lua | 4 + core/control.lua | 5 +- core/parser.lua | 27 +++++-- core/timemachine.lua | 123 ++++++++++++++++++++++-------- core/windows.lua | 6 +- functions/profiles.lua | 2 + gumps/janela_options.lua | 1 + images/icons.tga | Bin 399879 -> 400264 bytes 9 files changed, 136 insertions(+), 45 deletions(-) diff --git a/boot.lua b/boot.lua index 27e69f36..e384e2ce 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 = 996 --it's 996 for release - _detalhes.userversion = "v3.15.0" + _detalhes.userversion = "v3.15.1" _detalhes.realversion = 69 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" Details = _detalhes @@ -21,16 +21,21 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ -||cFFFFFF00v3.15.0 (|cFFFFCC00May 29, 2015|r|cFFFFFF00)|r:\n\n - |cFFFFFF00-|r Added support for battlegrounds.\n\n +|cFFFFFF00v3.15.1 (|cFFFFCC00May 30, 2015|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r Activity time now has only 3 seconds inactivity tolerance on battlegrounds and arenas.\n\n +|cFFFFFF00-|r Effective time will automatically be used when inside a battleground and using sync from the score board.\n\n +|cFFFFFF00-|r Added 'hide all' option on the minimap menu.\n\n +|cFFFFFF00-|r Added support for battlegrounds.\n\n |cFFFFFF00-|r Added option for disable showing battleground enemies when the window is in group mode.\n\n |cFFFFFF00-|r Added option to disable the sync from battleground score board.\n\n |cFFFFFF00-|r Enemies from a battleground match segment won't be erased when the player logout.\n\n --]] +--|cFFFFFF00v3.15.1 (|cFFFFCC00May 30, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Activity time now has only 3 seconds inactivity tolerance on battlegrounds and arenas.\n\n|cFFFFFF00-|r Effective time will automatically be used when inside a battleground and using sync from the score board.\n\n|cFFFFFF00-|r Added 'hide all' option on the minimap menu.\n\n|cFFFFFF00-|r Added support for battlegrounds.\n\n|cFFFFFF00-|r Added option for disable showing battleground enemies when the window is in group mode.\n\n|cFFFFFF00-|r Added option to disable the sync from battleground score board.\n\n|cFFFFFF00-|r Enemies from a battleground match segment won't be erased when the player logout.\n\n + -- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.15.0 (|cFFFFCC00May 29, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added support for battlegrounds.\n\n|cFFFFFF00-|r Added option for disable showing battleground enemies when the window is in group mode.\n\n|cFFFFFF00-|r Added option to disable the sync from battleground score board.\n\n|cFFFFFF00-|r Enemies from a battleground match segment won't be erased when the player logout.\n\n|cFFFFFF00v3.14.4 (|cFFFFCC00May 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r TimeLine (plugin): now also shows marks symbolizing the player death.\n\n|cFFFFFF00-|r Added raid history panel. Open it through bookmark or /details history.\n\n|cFFFFFF00-|r Added support for skins for Player Detail Window.\n\n|cFFFFFF00-|r Added report history on report button.\n\n|cFFFFFF00-|r Added key bindings settings for report what is shown on window #1 or #2.\n\n|cFFFFFF00v3.14.0b (|cFFFFCC00May 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Several texture changes for a smaller download size.\n\n|cFFFFFF00v3.13.4a (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Created 'Details! Forge' but is still under development: /details forge.\n\n|cFFFFFF00-|r Several improvements on combatlog reader and custom displays.\n\n|cFFFFFF00-|r Improvements on enemies damage taken tooltip.\n\n|cFFFFFF00v3.13.1 (|cFFFFCC00April 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added casted amount for healing and damage spells. The result is shown on Player Detail Window and Comparison Panel.\n\n|cFFFFFF00-|r Added uptime amount for healing spells on Player Detail Window.\n\n|cFFFFFF00-|r Added an option to disable lock/resize/ungroup buttons. It's under miscellaneous bracket on Options Panel.\n\n|cFFFFFF00-|r Wallpaper for menus on title bar got a customization option under tooltips bracket on Options Panel.\n\n|cFFFFFF00-|r Updated spell list for Crowd Control and class detection.\n\n|cFFFFFF00-|r Improved Weakaura creation tool under Encounter Details Plugin.\n\n|cFFFFFF00v3.12.10 (|cFFFFCC00April 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added the spell uptime on damage player detail window.\n\n|cFFFFFF00-|r Added Rune Tap as cooldown.\n\n|cFFFFFF00-|r Report lines for deaths is now inverted. No need to scroll up the chat to see the cause of death anymore.\n\n|cFFFFFF00-|r Fixed some annoyances with auto current feature where it was changing the segments even when the user were using the window.\n\n|cFFFFFF00v3.12.7 (|cFFFFCC00April 09, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added slash command /details profile .\n\n|cFFFFFF00v3.12.6 (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): added a report button on Emotes tab.\n\n|cFFFFFF00-|r Encounter Details (plugin): improved Weakauras creation.\n\n|cFFFFFF00-|r Encounter Details (plugin): fixed the report text for interrupts and dispells.\n\n|cFFFFFF00-|r Crowd control by Pets now is merged with its owner.\n\n|cFFFFFF00-|r Truncated left text on bars now shows the entire text when hover over the bar.\n\n|cFFFFFF00-|r Added an extra option on minimap menu to disable the minimap icon.\n\n|cFFFFFF00-|r Fixed a problem when disabling the minimap icon through options panel.\n\n|cFFFFFF00-|r Fixed an issue with item level tracker feature.\n\n|cFFFFFF00v3.12.2 (|cFFFFCC00Mar 30, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Raid Check (plugin): added item level.\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): bug fixes, it's important to update it.\n\n|cFFFFFF00-|r Time Line (plugin): bug fixes.\n\n|cFFFFFF00-|r Added option to disabled th eitem level tracker.\n\n|cFFFFFF00-|r Added item level on Raid Check plugin panel.\n\n|cFFFFFF00-|r Added Spirit Link Totem damage and healing on death log.\n\n|cFFFFFF00-|r Added the total of life exchanged by the Spirit Link Totem on player detail window.\n\n|cFFFFFF00-|r Added more spells for crowd control.\n\n|cFFFFFF00-|r Added scroll on bookmark panel.\n\n|cFFFFFF00-|r Fixed issue with Dps/Hps data broker which wasn't respecting the type of time (effective/activity) selected.\n\n|cFFFFFF00-|r Fixed few bugs when using the key bind to toggle windows.\n\n|cFFFFFF00v3.11.5 (|cFFFFCC00Mar 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with overall data where max/min amount for spells was being calculated wrong.\n\n|cFFFFFF00-|r Fixed a problem while reporting enemy damage taken.\n\n|cFFFFFF00-|r Fixed an issue with damage taken by spell where some spells wasn't shown.\n\n|cFFFFFF00-|r Few improvements on tooltips.\n\n|cFFFFFF00-|r Fixed a accuracy problem with shaman's spirit link toten where its life exchange was considered healing done.\n\n|cFFFFFF00-|r Boss segments now need to have at least 30 seconds to be added on the overall data.\n\n|cFFFFFF00-|r When the segment limit is reach, segments with less combat time will be erased instead of the olders.\n\n|cFFFFFF00-|r Added item level tracker.\n\n|cFFFFFF00-|r Fixed window positioning when changing from Solo mode to Group mode.\n\n|cFFFFFF00-|r Added an option for change the amount of lines on death log.\n\n|cFFFFFF00-|r Added custom display for CC done.\n\n|cFFFFFF00v3.10.10 (|cFFFFCC00Mar 10, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): done a calibration on endurance calculation.\n\n|cFFFFFF00-|r Raid Check (plugin): now also show information for 50+ stats runes.\n\n|cFFFFFF00-|r Fixed cooldowns spell targets on overall data.\n\n|cFFFFFF00-|r Fixed report custom displays where sometimes it didn't report spell links.\n\n|cFFFFFF00-|r Replaced old report line saying 'for the last X segments' with 'overall data'.\n\n|cFFFFFF00-|r Mini-displays on statusbar are now more responsible to right button click.\n\n|cFFFFFF00-|r Added Mage's Greater Invisibility as cooldown.\n\n|cFFFFFF00v3.10.8 (|cFFFFCC00Mar 02, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Improved aura creation.\n\n|cFFFFFF00-|r Custom display 'My Spells' now also show your pets.\n\n|cFFFFFF00-|r Fixed 'Raid Check' plugin food detection.\n\n|cFFFFFF00v3.10.6 (|cFFFFCC00Feb 24, 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 Segments menu now also show the encounter try number plus the elapsed combat time.\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." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.15.1 (|cFFFFCC00May 30, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Activity time now has only 3 seconds inactivity tolerance on battlegrounds and arenas.\n\n|cFFFFFF00-|r Effective time will automatically be used when inside a battleground and using sync from the score board.\n\n|cFFFFFF00-|r Added 'hide all' option on the minimap menu.\n\n|cFFFFFF00-|r Added support for battlegrounds.\n\n|cFFFFFF00-|r Added option for disable showing battleground enemies when the window is in group mode.\n\n|cFFFFFF00-|r Added option to disable the sync from battleground score board.\n\n|cFFFFFF00-|r Enemies from a battleground match segment won't be erased when the player logout.\n\n|cFFFFFF00v3.14.4 (|cFFFFCC00May 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r TimeLine (plugin): now also shows marks symbolizing the player death.\n\n|cFFFFFF00-|r Added raid history panel. Open it through bookmark or /details history.\n\n|cFFFFFF00-|r Added support for skins for Player Detail Window.\n\n|cFFFFFF00-|r Added report history on report button.\n\n|cFFFFFF00-|r Added key bindings settings for report what is shown on window #1 or #2.\n\n|cFFFFFF00v3.14.0b (|cFFFFCC00May 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Several texture changes for a smaller download size.\n\n|cFFFFFF00v3.13.4a (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Created 'Details! Forge' but is still under development: /details forge.\n\n|cFFFFFF00-|r Several improvements on combatlog reader and custom displays.\n\n|cFFFFFF00-|r Improvements on enemies damage taken tooltip.\n\n|cFFFFFF00v3.13.1 (|cFFFFCC00April 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added casted amount for healing and damage spells. The result is shown on Player Detail Window and Comparison Panel.\n\n|cFFFFFF00-|r Added uptime amount for healing spells on Player Detail Window.\n\n|cFFFFFF00-|r Added an option to disable lock/resize/ungroup buttons. It's under miscellaneous bracket on Options Panel.\n\n|cFFFFFF00-|r Wallpaper for menus on title bar got a customization option under tooltips bracket on Options Panel.\n\n|cFFFFFF00-|r Updated spell list for Crowd Control and class detection.\n\n|cFFFFFF00-|r Improved Weakaura creation tool under Encounter Details Plugin.\n\n|cFFFFFF00v3.12.10 (|cFFFFCC00April 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added the spell uptime on damage player detail window.\n\n|cFFFFFF00-|r Added Rune Tap as cooldown.\n\n|cFFFFFF00-|r Report lines for deaths is now inverted. No need to scroll up the chat to see the cause of death anymore.\n\n|cFFFFFF00-|r Fixed some annoyances with auto current feature where it was changing the segments even when the user were using the window.\n\n|cFFFFFF00v3.12.7 (|cFFFFCC00April 09, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added slash command /details profile .\n\n|cFFFFFF00v3.12.6 (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): added a report button on Emotes tab.\n\n|cFFFFFF00-|r Encounter Details (plugin): improved Weakauras creation.\n\n|cFFFFFF00-|r Encounter Details (plugin): fixed the report text for interrupts and dispells.\n\n|cFFFFFF00-|r Crowd control by Pets now is merged with its owner.\n\n|cFFFFFF00-|r Truncated left text on bars now shows the entire text when hover over the bar.\n\n|cFFFFFF00-|r Added an extra option on minimap menu to disable the minimap icon.\n\n|cFFFFFF00-|r Fixed a problem when disabling the minimap icon through options panel.\n\n|cFFFFFF00-|r Fixed an issue with item level tracker feature.\n\n|cFFFFFF00v3.12.2 (|cFFFFCC00Mar 30, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Raid Check (plugin): added item level.\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): bug fixes, it's important to update it.\n\n|cFFFFFF00-|r Time Line (plugin): bug fixes.\n\n|cFFFFFF00-|r Added option to disabled th eitem level tracker.\n\n|cFFFFFF00-|r Added item level on Raid Check plugin panel.\n\n|cFFFFFF00-|r Added Spirit Link Totem damage and healing on death log.\n\n|cFFFFFF00-|r Added the total of life exchanged by the Spirit Link Totem on player detail window.\n\n|cFFFFFF00-|r Added more spells for crowd control.\n\n|cFFFFFF00-|r Added scroll on bookmark panel.\n\n|cFFFFFF00-|r Fixed issue with Dps/Hps data broker which wasn't respecting the type of time (effective/activity) selected.\n\n|cFFFFFF00-|r Fixed few bugs when using the key bind to toggle windows.\n\n|cFFFFFF00v3.11.5 (|cFFFFCC00Mar 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with overall data where max/min amount for spells was being calculated wrong.\n\n|cFFFFFF00-|r Fixed a problem while reporting enemy damage taken.\n\n|cFFFFFF00-|r Fixed an issue with damage taken by spell where some spells wasn't shown.\n\n|cFFFFFF00-|r Few improvements on tooltips.\n\n|cFFFFFF00-|r Fixed a accuracy problem with shaman's spirit link toten where its life exchange was considered healing done.\n\n|cFFFFFF00-|r Boss segments now need to have at least 30 seconds to be added on the overall data.\n\n|cFFFFFF00-|r When the segment limit is reach, segments with less combat time will be erased instead of the olders.\n\n|cFFFFFF00-|r Added item level tracker.\n\n|cFFFFFF00-|r Fixed window positioning when changing from Solo mode to Group mode.\n\n|cFFFFFF00-|r Added an option for change the amount of lines on death log.\n\n|cFFFFFF00-|r Added custom display for CC done.\n\n|cFFFFFF00v3.10.10 (|cFFFFCC00Mar 10, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): done a calibration on endurance calculation.\n\n|cFFFFFF00-|r Raid Check (plugin): now also show information for 50+ stats runes.\n\n|cFFFFFF00-|r Fixed cooldowns spell targets on overall data.\n\n|cFFFFFF00-|r Fixed report custom displays where sometimes it didn't report spell links.\n\n|cFFFFFF00-|r Replaced old report line saying 'for the last X segments' with 'overall data'.\n\n|cFFFFFF00-|r Mini-displays on statusbar are now more responsible to right button click.\n\n|cFFFFFF00-|r Added Mage's Greater Invisibility as cooldown.\n\n|cFFFFFF00v3.10.8 (|cFFFFCC00Mar 02, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Improved aura creation.\n\n|cFFFFFF00-|r Custom display 'My Spells' now also show your pets.\n\n|cFFFFFF00-|r Fixed 'Raid Check' plugin food detection.\n\n|cFFFFFF00v3.10.6 (|cFFFFCC00Feb 24, 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 Segments menu now also show the encounter try number plus the elapsed combat time.\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." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/classes/container_combatentes.lua b/classes/container_combatentes.lua index f102eb0b..80f19ea3 100644 --- a/classes/container_combatentes.lua +++ b/classes/container_combatentes.lua @@ -495,6 +495,10 @@ self._ActorTable [size] = novo_objeto --> grava na tabela de indexes self._NameIndexTable [nome] = size --> grava no hash map o index deste jogador + if (_detalhes.is_in_battleground or _detalhes.is_in_arena) then + novo_objeto.pvp = true + end + return novo_objeto, dono_do_pet, nome else return nil, nil, nil diff --git a/core/control.lua b/core/control.lua index 1827cf86..91c552d3 100644 --- a/core/control.lua +++ b/core/control.lua @@ -546,8 +546,9 @@ local tempo_do_combate = _detalhes.tabela_vigente:GetCombatTime() local invalid_combat - --if ( tempo_do_combate >= _detalhes.minimum_combat_time) then --> tempo minimo precisa ser 5 segundos pra acrecentar a tabela ao historico - if ( tempo_do_combate >= 5 or not _detalhes.tabela_historico.tabelas[1]) then --> tempo minimo precisa ser 5 segundos pra acrecentar a tabela ao historico + --if ( tempo_do_combate >= ) then --> tempo minimo precisa ser 5 segundos pra acrecentar a tabela ao historico + --if ( tempo_do_combate >= 5 or not _detalhes.tabela_historico.tabelas[1]) then --> tempo minimo precisa ser 5 segundos pra acrecentar a tabela ao historico + if ( tempo_do_combate >= _detalhes.minimum_combat_time or not _detalhes.tabela_historico.tabelas[1]) then --> tempo minimo precisa ser 5 segundos pra acrecentar a tabela ao historico _detalhes.tabela_historico:adicionar (_detalhes.tabela_vigente) --move a tabela atual para dentro do histórico else --print ("combat invalid...") diff --git a/core/parser.lua b/core/parser.lua index 8a7a6649..06e41d67 100644 --- a/core/parser.lua +++ b/core/parser.lua @@ -2888,6 +2888,8 @@ _detalhes.last_zone_type = zoneType end + _detalhes.time_type = _detalhes.time_type_original + _detalhes:CheckChatOnZoneChange (zoneType) if (_detalhes.debug) then @@ -2900,6 +2902,7 @@ if (_detalhes.is_in_battleground and zoneType ~= "pvp") then _detalhes.pvp_parser_frame:StopBgUpdater() _detalhes.is_in_battleground = nil + _detalhes.time_type = _detalhes.time_type_original end if (zoneType == "pvp") then @@ -2920,8 +2923,19 @@ _current_combat.pvp = true _current_combat.is_pvp = {name = zoneName, mapid = zoneMapID} - - _detalhes.pvp_parser_frame:StartBgUpdater() + + if (_detalhes.use_battleground_server_parser) then + if (_detalhes.time_type == 1) then + _detalhes.time_type_original = 1 + _detalhes.time_type = 2 + end + _detalhes.pvp_parser_frame:StartBgUpdater() + else + if (_detalhes.force_activity_time_pvp) then + _detalhes.time_type_original = _detalhes.time_type + _detalhes.time_type = 1 + end + end elseif (zoneType == "arena") then @@ -2929,6 +2943,11 @@ _detalhes:Msg ("(debug) zone type is arena.") end + if (_detalhes.force_activity_time_pvp) then + _detalhes.time_type_original = _detalhes.time_type + _detalhes.time_type = 1 + end + _detalhes.is_in_arena = true _detalhes:EnteredInArena() @@ -3717,10 +3736,6 @@ function _detalhes.pvp_parser_frame:StartBgUpdater() - if (not _detalhes.use_battleground_server_parser) then - return - end - _detalhes.pvp_parser_frame:RegisterEvent ("UPDATE_BATTLEFIELD_SCORE") if (_detalhes.pvp_parser_frame.ticker) then _detalhes:CancelTimer (_detalhes.pvp_parser_frame.ticker) diff --git a/core/timemachine.lua b/core/timemachine.lua index cc33de19..331e2bcd 100644 --- a/core/timemachine.lua +++ b/core/timemachine.lua @@ -19,19 +19,32 @@ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> constants local _tempo = _time() - local _tempo = _time() ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> core timeMachine.ligada = false - function timeMachine:Core() - - _tempo = _time() - _detalhes._tempo = _tempo - _detalhes:UpdateGears() - + local calc_for_pvp = function (self) + for tipo, tabela in _pairs (self.tabelas) do + for nome, jogador in _ipairs (tabela) do + if (jogador) then + if (jogador.last_event+3 > _tempo) then --> okey o jogador esta dando dps + if (jogador.on_hold) then --> o dps estava pausado, retornar a ativa + jogador:HoldOn (false) + end + else + if (not jogador.on_hold) then --> não ta pausado, precisa por em pausa + --> verifica se esta castando alguma coisa que leve + que 3 segundos + jogador:HoldOn (true) + end + end + end + end + end + end + + local calc_for_pve = function (self) for tipo, tabela in _pairs (self.tabelas) do for nome, jogador in _ipairs (tabela) do if (jogador) then @@ -49,6 +62,18 @@ end end end + + function timeMachine:Core() + _tempo = _time() + _detalhes._tempo = _tempo + _detalhes:UpdateGears() + + if (_detalhes.is_in_battleground or _detalhes.is_in_arena) then + return calc_for_pvp (self) + else + return calc_for_pve (self) + end + end function timeMachine:Ligar() self.atualizador = self:ScheduleRepeatingTimer ("Core", 1) @@ -125,33 +150,67 @@ end function _detalhes:Tempo() - if (self.end_time) then --> o tempo do jogador esta trancado - local t = self.end_time - self.start_time - if (t < 10) then - t = 10 - end - return t - elseif (self.on_hold) then --> o tempo esta em pausa - local t = self.delay - self.start_time - if (t < 10) then - t = 10 - end - return t - else - if (self.start_time == 0) then - return 10 - end - local t = _tempo - self.start_time - if (t < 10) then - if (_detalhes.in_combat) then - local combat_time = _detalhes.tabela_vigente:GetCombatTime() - if (combat_time < 10) then - return combat_time - end + + if (self.pvp) then + --> pvp timer + if (self.end_time) then --> o tempo do jogador esta trancado + local t = self.end_time - self.start_time + if (t < 3) then + t = 3 end - t = 10 + return t + elseif (self.on_hold) then --> o tempo esta em pausa + local t = self.delay - self.start_time + if (t < 3) then + t = 3 + end + return t + else + if (self.start_time == 0) then + return 3 + end + local t = _tempo - self.start_time + if (t < 3) then + if (_detalhes.in_combat) then + local combat_time = _detalhes.tabela_vigente:GetCombatTime() + if (combat_time < 3) then + return combat_time + end + end + t = 3 + end + return t + end + else + --> pve timer + if (self.end_time) then --> o tempo do jogador esta trancado + local t = self.end_time - self.start_time + if (t < 10) then + t = 10 + end + return t + elseif (self.on_hold) then --> o tempo esta em pausa + local t = self.delay - self.start_time + if (t < 10) then + t = 10 + end + return t + else + if (self.start_time == 0) then + return 10 + end + local t = _tempo - self.start_time + if (t < 10) then + if (_detalhes.in_combat) then + local combat_time = _detalhes.tabela_vigente:GetCombatTime() + if (combat_time < 10) then + return combat_time + end + end + t = 10 + end + return t end - return t end end diff --git a/core/windows.lua b/core/windows.lua index 050c3fb3..5c6526ab 100644 --- a/core/windows.lua +++ b/core/windows.lua @@ -2704,11 +2704,15 @@ --> nova instancia GameCooltip:AddMenu (1, _detalhes.CriarInstancia, true, nil, nil, Loc ["STRING_MINIMAPMENU_NEWWINDOW"], nil, true) - GameCooltip:AddIcon ([[Interface\Buttons\UI-AttributeButton-Encourage-Up]], 1, 1, 16, 16) + --GameCooltip:AddIcon ([[Interface\Buttons\UI-AttributeButton-Encourage-Up]], 1, 1, 10, 10, 4/16, 12/16, 4/16, 12/16) + GameCooltip:AddIcon ([[Interface\AddOns\Details\images\icons]], 1, 1, 12, 11, 462/512, 473/512, 1/512, 11/512) --> reopen all windows GameCooltip:AddMenu (1, _detalhes.ReabrirTodasInstancias, true, nil, nil, Loc ["STRING_MINIMAPMENU_REOPENALL"], nil, true) GameCooltip:AddIcon ([[Interface\Buttons\UI-MicroStream-Green]], 1, 1, 14, 14, 0.1875, 0.8125, 0.84375, 0.15625) + --> close all windows + GameCooltip:AddMenu (1, _detalhes.ShutDownAllInstances, true, nil, nil, Loc ["STRING_MINIMAPMENU_CLOSEALL"], nil, true) + GameCooltip:AddIcon ([[Interface\Buttons\UI-MicroStream-Red]], 1, 1, 14, 14, 0.1875, 0.8125, 0.15625, 0.84375) GameCooltip:AddLine ("$div") diff --git a/functions/profiles.lua b/functions/profiles.lua index 668a24dc..dbb7cf44 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -889,6 +889,7 @@ local default_profile = { scroll_speed = 2, update_speed = 1, time_type = 2, + time_type_original = 2, memory_threshold = 3, memory_ram = 64, remove_realm_from_name = true, @@ -937,6 +938,7 @@ local default_profile = { close_shields = false, pvp_as_group = true, use_battleground_server_parser = true, + force_activity_time_pvp = true, --> skins standard_skin = false, diff --git a/gumps/janela_options.lua b/gumps/janela_options.lua index 14ec8665..aee8ff3c 100644 --- a/gumps/janela_options.lua +++ b/gumps/janela_options.lua @@ -4156,6 +4156,7 @@ function window:CreateFrame2() -- local onSelectTimeType = function (_, _, timetype) _detalhes.time_type = timetype + _detalhes.time_type_original = timetype _detalhes:AtualizaGumpPrincipal (-1, true) _detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance) end diff --git a/images/icons.tga b/images/icons.tga index 6bb140b26174d3edda8c697db5fbd51690f8582b..741a315f53701af0be2951459fb730c22962687a 100644 GIT binary patch delta 500 zcmZqQBGIv3qM?Pcg{g(Pg{6gc3!4)&cjN#6{~5X%7#RLf-R{iHc8y6CECLi@_}{_c zD)1l7nz~(zjcpaPI#`YoBnOgeWUvwV&&XgP@Lz1!`v1)g7923uM>*NfFd2eXvw>8z z+6ez=FcSFB5$*mTrXHlcks&(>XaYnd&;^rt*qE8L!TOkBwlJ81Yyw)s0J5bCq?i$; z4J1Ex`!qhbzl=ya7+nSbi%wqrzY(OELGk>5ppMJWfjTmLp*p4ruyHaeBYfEm@#XdR zK$R{MK$WplP?ht9*iJHPqN!wM0ICEj1gmoq{m&360#%oL%ldqkJx_(ccK3b zUO)_Xdx03+QbsL=`Hdi#G%=J${byka1!{-_Vn1NOL1F>uSuqK=P)6(#G(AU>tsFTv Kr$3QoQw9JZy}V`s delta 115 zcmeC!F44Y4qM?Pcg{g(Pg{6gc3!4)&