diff --git a/boot.lua b/boot.lua index fbc6e120..2c7b91b2 100644 --- a/boot.lua +++ b/boot.lua @@ -8,7 +8,7 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.userversion = "v1.5.1" + _detalhes.userversion = "v1.5.2" _detalhes.version = "Alpha 009" _detalhes.realversion = 9 diff --git a/classes/classe_combate.lua b/classes/classe_combate.lua index 020f80e1..9051c9be 100644 --- a/classes/classe_combate.lua +++ b/classes/classe_combate.lua @@ -259,7 +259,8 @@ function _detalhes.refresh:r_combate (tabela_combate, shadow) end function _detalhes.clear:c_combate (tabela_combate) - tabela_combate.__index = {} + --tabela_combate.__index = {} + tabela_combate.__index = nil tabela_combate.__call = {} tabela_combate._combat_table = nil tabela_combate.shadow = nil diff --git a/classes/classe_damage.lua b/classes/classe_damage.lua index 5138974d..dfd42ea2 100644 --- a/classes/classe_damage.lua +++ b/classes/classe_damage.lua @@ -75,8 +75,6 @@ function atributo_damage:NovaTabela (serial, nome, link) damage_taken = 0, --> total de dano que este jogador levou damage_from = {}, --> armazena os nomes que deram dano neste jogador - - avoidance = {["DODGE"] = 0, ["PARRY"] = 0, ["HITS"] = 0}, --> avoidance dps_started = false, last_event = 0, @@ -2240,7 +2238,8 @@ function _detalhes.refresh:r_atributo_damage (este_jogador, shadow) end function _detalhes.clear:c_atributo_damage (este_jogador) - este_jogador.__index = {} + --este_jogador.__index = {} + este_jogador.__index = nil este_jogador.shadow = nil este_jogador.links = nil este_jogador.minha_barra = nil diff --git a/classes/classe_damage_habilidade.lua b/classes/classe_damage_habilidade.lua index d0d41ada..4bb196d2 100644 --- a/classes/classe_damage_habilidade.lua +++ b/classes/classe_damage_habilidade.lua @@ -270,7 +270,8 @@ function _detalhes.refresh:r_habilidade_dano (habilidade, shadow) --recebeu o co end function _detalhes.clear:c_habilidade_dano (habilidade) - habilidade.__index = {} + --habilidade.__index = {} + habilidade.__index = nil habilidade.shadow = nil _detalhes.clear:c_container_combatentes (habilidade.targets) diff --git a/classes/classe_energy.lua b/classes/classe_energy.lua index 917fc8c7..55f01aa8 100644 --- a/classes/classe_energy.lua +++ b/classes/classe_energy.lua @@ -885,7 +885,8 @@ function _detalhes.refresh:r_atributo_energy (este_jogador, shadow) end function _detalhes.clear:c_atributo_energy (este_jogador) - este_jogador.__index = {} + --este_jogador.__index = {} + este_jogador.__index = nil este_jogador.shadow = nil este_jogador.links = nil este_jogador.minha_barra = nil diff --git a/classes/classe_energy_habilidade.lua b/classes/classe_energy_habilidade.lua index 726574f4..1f39f8cf 100644 --- a/classes/classe_energy_habilidade.lua +++ b/classes/classe_energy_habilidade.lua @@ -85,6 +85,7 @@ function _detalhes.refresh:r_habilidade_e_energy (habilidade, shadow) --recebeu end function _detalhes.clear:c_habilidade_e_energy (habilidade) + --habilidade.__index = {} habilidade.__index = {} habilidade.shadow = nil diff --git a/classes/classe_heal.lua b/classes/classe_heal.lua index 55b157e9..14221fb1 100644 --- a/classes/classe_heal.lua +++ b/classes/classe_heal.lua @@ -1596,7 +1596,8 @@ function _detalhes.refresh:r_atributo_heal (este_jogador, shadow) end function _detalhes.clear:c_atributo_heal (este_jogador) - este_jogador.__index = {} + --este_jogador.__index = {} + este_jogador.__index = nil este_jogador.shadow = nil este_jogador.links = nil este_jogador.minha_barra = nil diff --git a/classes/classe_heal_habilidade.lua b/classes/classe_heal_habilidade.lua index 57ba426f..4f38e106 100644 --- a/classes/classe_heal_habilidade.lua +++ b/classes/classe_heal_habilidade.lua @@ -128,7 +128,8 @@ function _detalhes.refresh:r_habilidade_cura (habilidade, shadow) end function _detalhes.clear:c_habilidade_cura (habilidade) - habilidade.__index = {} + --habilidade.__index = {} + habilidade.__index = nil habilidade.shadow = nil _detalhes.clear:c_container_combatentes (habilidade.targets) diff --git a/classes/classe_others.lua b/classes/classe_others.lua index 44532fb0..544c7436 100644 --- a/classes/classe_others.lua +++ b/classes/classe_others.lua @@ -1625,6 +1625,13 @@ function _detalhes.refresh:r_atributo_misc (este_jogador, shadow) _detalhes.refresh:r_container_combatentes (este_jogador.interrupt_targets, shadow.interrupt_targets) _detalhes.refresh:r_container_habilidades (este_jogador.interrupt_spell_tables, shadow.interrupt_spell_tables) end + + --> refresh buff uptime + if (este_jogador.buff_uptime_targets) then + _detalhes.refresh:r_container_combatentes (este_jogador.buff_uptime_targets, shadow.buff_uptime_targets) + _detalhes.refresh:r_container_habilidades (este_jogador.buff_uptime_spell_tables, shadow.buff_uptime_spell_tables) + end + --> refresh cooldowns defensive if (este_jogador.cooldowns_defensive_targets) then _detalhes.refresh:r_container_combatentes (este_jogador.cooldowns_defensive_targets, shadow.cooldowns_defensive_targets) @@ -1655,12 +1662,19 @@ function _detalhes.refresh:r_atributo_misc (este_jogador, shadow) _detalhes.refresh:r_container_combatentes (este_jogador.interrupt_targets, -1) _detalhes.refresh:r_container_habilidades (este_jogador.interrupt_spell_tables, -1) end + --> refresh cooldowns defensive if (este_jogador.cooldowns_defensive_targets) then _detalhes.refresh:r_container_combatentes (este_jogador.cooldowns_defensive_targets, -1) _detalhes.refresh:r_container_habilidades (este_jogador.cooldowns_defensive_spell_tables, -1) end + --> refresh buff uptime + if (este_jogador.buff_uptime_targets) then + _detalhes.refresh:r_container_combatentes (este_jogador.buff_uptime_targets, -1) + _detalhes.refresh:r_container_habilidades (este_jogador.buff_uptime_spell_tables, -1) + end + --> refresh ressers if (este_jogador.ress_targets) then _detalhes.refresh:r_container_combatentes (este_jogador.ress_targets, -1) @@ -1683,7 +1697,8 @@ end function _detalhes.clear:c_atributo_misc (este_jogador) - este_jogador.__index = {} + --este_jogador.__index = {} + este_jogador.__index = nil este_jogador.shadow = nil este_jogador.links = nil este_jogador.minha_barra = nil @@ -1692,11 +1707,17 @@ function _detalhes.clear:c_atributo_misc (este_jogador) _detalhes.clear:c_container_combatentes (este_jogador.interrupt_targets) _detalhes.clear:c_container_habilidades (este_jogador.interrupt_spell_tables) end + if (este_jogador.cooldowns_defensive_targets) then _detalhes.clear:c_container_combatentes (este_jogador.cooldowns_defensive_targets) _detalhes.clear:c_container_habilidades (este_jogador.cooldowns_defensive_spell_tables) end + if (este_jogador.buff_uptime_targets) then + _detalhes.clear:c_container_combatentes (este_jogador.buff_uptime_targets) + _detalhes.clear:c_container_habilidades (este_jogador.buff_uptime_spell_tables) + end + if (este_jogador.ress_targets) then _detalhes.clear:c_container_combatentes (este_jogador.ress_targets) _detalhes.clear:c_container_habilidades (este_jogador.ress_spell_tables) diff --git a/classes/classe_others_habilidade.lua b/classes/classe_others_habilidade.lua index d7e414b4..826b5b1f 100644 --- a/classes/classe_others_habilidade.lua +++ b/classes/classe_others_habilidade.lua @@ -195,7 +195,8 @@ function _detalhes.refresh:r_habilidade_misc (habilidade, shadow) --recebeu o co end function _detalhes.clear:c_habilidade_misc (habilidade) - habilidade.__index = {} + --habilidade.__index = {} + habilidade.__index = nil habilidade.shadow = nil _detalhes.clear:c_container_combatentes (habilidade.targets) diff --git a/classes/classe_target.lua b/classes/classe_target.lua index 65a03c3a..233dc7eb 100644 --- a/classes/classe_target.lua +++ b/classes/classe_target.lua @@ -40,7 +40,8 @@ end function _detalhes.clear:c_alvo_da_habilidade (este_alvo) este_alvo.shadow = nil - este_alvo.__index = {} + --este_alvo.__index = {} + este_alvo.__index = nil end alvo_da_habilidade.__sub = function (tabela1, tabela2) diff --git a/classes/container_combatentes.lua b/classes/container_combatentes.lua index 31712d7a..dd42602e 100644 --- a/classes/container_combatentes.lua +++ b/classes/container_combatentes.lua @@ -274,6 +274,9 @@ function container_combatentes:PegarCombatente (serial, nome, flag, criar, isOwn end end + if (novo_objeto.grupo) then + novo_objeto.avoidance = {["DODGE"] = 0, ["PARRY"] = 0, ["HITS"] = 0} --> avoidance + end elseif (self.tipo == container_heal) then --> CONTAINER HEALING @@ -486,7 +489,8 @@ function _detalhes.refresh:r_container_combatentes (container, shadow) end function _detalhes.clear:c_container_combatentes (container) - container.__index = {} + --container.__index = {} + container.__index = nil container.shadow = nil container._NameIndexTable = nil container.need_refresh = nil diff --git a/classes/container_habilidades.lua b/classes/container_habilidades.lua index 82d88f13..35eabe72 100644 --- a/classes/container_habilidades.lua +++ b/classes/container_habilidades.lua @@ -123,7 +123,8 @@ function _detalhes.refresh:r_container_habilidades (container, shadow) end function _detalhes.clear:c_container_habilidades (container) - container.__index = {} + --container.__index = {} + container.__index = nil container.shadow = nil container.funcao_de_criacao = nil end diff --git a/core/parser.lua b/core/parser.lua index c6611fde..1ccc74f2 100644 --- a/core/parser.lua +++ b/core/parser.lua @@ -434,7 +434,7 @@ --> 'avoider' --> using this method means avoidance of pets will not be tracked local TargetActor = damage_cache [alvo_name] - if (TargetActor) then + if (TargetActor and TargetActor.grupo) then local missTable = TargetActor.avoidance [missType] if (missTable) then TargetActor.avoidance [missType] = missTable +1 @@ -2214,6 +2214,16 @@ end end + --"ENVIRONMENTAL_DAMAGE" --> damage aplied by enviorement like lava. + --SPELL_PERIODIC_MISSED --> need research + --DAMAGE_SHIELD_MISSED --> need research + --SPELL_EXTRA_ATTACKS --> need research + --SPELL_DRAIN --> need research + --SPELL_LEECH --> need research + --SPELL_PERIODIC_DRAIN --> need research + --SPELL_PERIODIC_LEECH --> need research + --SPELL_DISPEL_FAILED --> need research + function _detalhes:CaptureEnable (capture_type) capture_type = string.lower (capture_type) @@ -2229,7 +2239,8 @@ token_list ["RANGE_MISSED"] = parser.rangemissed token_list ["SWING_MISSED"] = parser.swingmissed token_list ["SPELL_MISSED"] = parser.missed - + + elseif (capture_type == "heal") then token_list ["SPELL_HEAL"] = parser.heal token_list ["SPELL_PERIODIC_HEAL"] = parser.heal diff --git a/gumps/janela_news.lua b/gumps/janela_news.lua index 71e63862..30a4c17d 100644 --- a/gumps/janela_news.lua +++ b/gumps/janela_news.lua @@ -50,14 +50,60 @@ function _detalhes:CreateOrOpenNewsWindow() titulo:SetPoint ("center", frame, "center") titulo:SetPoint ("top", frame, "top", 0, -18) + local frame_upper = CreateFrame ("scrollframe", nil, frame) + local frame_lower = CreateFrame ("frame", nil, frame_upper) + frame_lower:SetSize (380, 390) + frame_upper:SetPoint ("topleft", frame, "topleft", 85, -100) + frame_upper:SetWidth (395) + frame_upper:SetHeight (370) + frame_upper:SetBackdrop({ + bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", + tile = true, tileSize = 16, + insets = {left = 1, right = 1, top = 0, bottom = 1},}) + frame_upper:SetBackdropColor (.1, .1, .1, .3) + frame_upper:SetScrollChild (frame_lower) + + local slider = CreateFrame ("slider", nil, frame) + slider.bg = slider:CreateTexture (nil, "background") + slider.bg:SetAllPoints (true) + slider.bg:SetTexture (0, 0, 0, 0.5) + + slider.thumb = slider:CreateTexture (nil, "OVERLAY") + slider.thumb:SetTexture ("Interface\\Buttons\\UI-ScrollBar-Knob") + slider.thumb:SetSize (25, 25) + + slider:SetThumbTexture (slider.thumb) + slider:SetOrientation ("vertical"); + slider:SetSize (16, 369) + slider:SetPoint ("topleft", frame_upper, "topright") + slider:SetMinMaxValues (0, 1000) + slider:SetValue(0) + slider:SetScript("OnValueChanged", function (self) + frame_upper:SetVerticalScroll (self:GetValue()) + end) + + frame_upper:EnableMouseWheel (true) + frame_upper:SetScript("OnMouseWheel", function (self, delta) + local current = slider:GetValue() + if (IsShiftKeyDown() and (delta > 0)) then + slider:SetValue(0) + elseif (IsShiftKeyDown() and (delta < 0)) then + slider:SetValue (1000) + elseif ((delta < 0) and (current < 1000)) then + slider:SetValue (current + 20) + elseif ((delta > 0) and (current > 1)) then + slider:SetValue (current - 20) + end + end) + --> text box - local texto = frame:CreateFontString ("DetailsNewsWindowText", "overlay", "GameFontNormal") - texto:SetPoint ("topleft", frame, "topleft", 100, -100) + local texto = frame_lower:CreateFontString ("DetailsNewsWindowText", "overlay", "GameFontNormal") + texto:SetPoint ("topleft", frame_lower, "topleft") texto:SetJustifyH ("left") texto:SetJustifyV ("top") texto:SetTextColor (1, 1, 1) - texto:SetWidth (400) - texto:SetHeight (500) + texto:SetWidth (380) + texto:SetHeight (1000) function frame:Title (title) titulo:SetText (title or "") diff --git a/locales/Details-enUS.lua b/locales/Details-enUS.lua index 648e37d5..c878c433 100644 --- a/locales/Details-enUS.lua +++ b/locales/Details-enUS.lua @@ -3,7 +3,7 @@ if not Loc then return end -------------------------------------------------------------------------------------------------------------------------------------------- - Loc ["STRING_VERSION_LOG"] = "Details! v1.5.0 / v1.5.1:\n\n|cFFFFFF00-|r Buff Uptime was been implemented over Miscellaneous attribute.\n\n|cFFFFFF00-|r Death Logs now also display cooldowns and last cooldown used.\n\n|cFFFFFF00-|r Added this window showing the latest changes.\n\n|cFFFFFF00-|r Fixed the issue were sometimes the instance stops to update when clicking on the attribute name over sword menu.\n\n|cFFFFFF00-|r Disabling Healing now shutdown the absorbs too, disabling auras doesn't interrupt absorbs any more.\n\n|cFFFFFF00-|r Friendly Fire now only track players which is inside a group.\n\n|cFFFFFF00-|r Fixed a issue were pet damage on target isn't added to owner target.\n\n|cFFFFFF00-|r Fixed a bug were refreshing a cooldown isn't counting.\n\n|cFFFFFF00-|r Added absorbs for shammy and monk 2P tier 16.\n\n|cFFFFFF00-|r Added slash command 'worldboss' and 'updates'.\n\n|cFFFFFF00-|r Fixed a issue with report data were sometimes wasn't working." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.5.2|r\n\n|cFFFFFF00-|r Avoidance statistics will not be recorded for pets, ungrouped players and monsters.\n\n|cFFFFFF00-|r Fixed a issue were sometimes buff uptime was taking too long to save data on logout.\n\n|cFFFFFF00v1.5.1|r\n\n|cFFFFFF00-|r Fixed a issue with report data were sometimes wasn't working.\n\n|cFFFFFF00v1.5.0|r\n\n|cFFFFFF00-|r Buff Uptime was been implemented over Miscellaneous attribute.\n\n|cFFFFFF00-|r Death Logs now also display cooldowns and last cooldown used.\n\n|cFFFFFF00-|r Added this window showing the latest changes.\n\n|cFFFFFF00-|r Fixed the issue were sometimes the instance stops to update when clicking on the attribute name over sword menu.\n\n|cFFFFFF00-|r Disabling Healing now shutdown the absorbs too, disabling auras doesn't interrupt absorbs any more.\n\n|cFFFFFF00-|r Friendly Fire now only track players which is inside a group.\n\n|cFFFFFF00-|r Fixed a issue were pet damage on target isn't added to owner target.\n\n|cFFFFFF00-|r Fixed a bug were refreshing a cooldown isn't counting.\n\n|cFFFFFF00-|r Added absorbs for shammy and monk 2P tier 16.\n\n|cFFFFFF00-|r Added slash command 'worldboss' and 'updates'.\n\n" Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails:|r " --> color and details name diff --git a/locales/Details-ptBR.lua b/locales/Details-ptBR.lua index 3ed7f263..ac45c3b9 100644 --- a/locales/Details-ptBR.lua +++ b/locales/Details-ptBR.lua @@ -3,7 +3,7 @@ if not Loc then return end -------------------------------------------------------------------------------------------------------------------------------------------- - Loc ["STRING_VERSION_LOG"] = "Details! v1.5.0 / v1.5.1:\n\n|cFFFFFF00-|r Buff Uptime foi implementado no atributo miscelanea.\n\n|cFFFFFF00-|r Cooldowns usados agora aparecem nos registros da morte.\n\n|cFFFFFF00-|r Implementado esta janela mostrando as atualizacoes.\n\n|cFFFFFF00-|r Corrigido problema onde algumas vezes clicando no nome do atributo fazia a instancia parar de atualizar.\n\n|cFFFFFF00-|r Desativando a cura agora para as absorcoes tambem. Desligando as Auras nao interrompe as absorcoes. \n\n|cFFFFFF00-|r Fogo Amigo agora conta apenas jogadores dentro do grupo.\n\n|cFFFFFF00-|r Corrigido problema onde o dano feito por um ajudando nao estava contando no alvo do dono.\n\n|cFFFFFF00-|r Corrigido problema onde a atualizacao de um cooldown nao estava sendo contada.\n\n|cFFFFFF00-|r Adicionada as magias de absorcao para 2P tier 16.\n\n|cFFFFFF00-|r Adicionado os comandos de barra 'worldboss' e 'updates'.\n\n|cFFFFFF00-|r Corrigido problema ao reportar onde algumas vezes nao estava funcionando." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.5.2|r\n\n|cFFFFFF00-|r Estatisticas de Avoidance nao seram mais capturadas para pessoas foram do grupo, monstros ou ajudantes.\n\n|cFFFFFF00-|r Corrigido problema onde as vezes estava demorando muito para salvar o tempo dos buffs ao sair do jogo.\n\n|cFFFFFF00v1.5.1|r\n\n|cFFFFFF00-|r Corrigido problema ao reportar o Dps onde as vezes nao mostrava nenhum jogador.\n\n|cFFFFFF00v1.5.0|r\n\n|cFFFFFF00-|r Buff Uptime foi implementado no atributo miscelanea.\n\n|cFFFFFF00-|r Cooldowns usados agora aparecem nos registros da morte.\n\n|cFFFFFF00-|r Implementado esta janela mostrando as atualizacoes.\n\n|cFFFFFF00-|r Corrigido problema onde algumas vezes clicando no nome do atributo fazia a instancia parar de atualizar.\n\n|cFFFFFF00-|r Desativando a cura agora para as absorcoes tambem. Desligando as Auras nao interrompe as absorcoes. \n\n|cFFFFFF00-|r Fogo Amigo agora conta apenas jogadores dentro do grupo.\n\n|cFFFFFF00-|r Corrigido problema onde o dano feito por um ajudando nao estava contando no alvo do dono.\n\n|cFFFFFF00-|r Corrigido problema onde a atualizacao de um cooldown nao estava sendo contada.\n\n|cFFFFFF00-|r Adicionada as magias de absorcao para 2P tier 16.\n\n|cFFFFFF00-|r Adicionado os comandos de barra 'worldboss' e 'updates'.\n\n|cFFFFFF00-|r Corrigido problema ao reportar onde algumas vezes nao estava funcionando." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetalhes:|r " --> color and details name