From 1f5afea571ee92b91bfd7eebf47b2e17b14caac5 Mon Sep 17 00:00:00 2001 From: tercio Date: Tue, 25 Feb 2014 21:55:20 -0300 Subject: [PATCH] updates --- boot.lua | 4 ++-- classes/classe_instancia.lua | 6 ++++-- core/parser.lua | 21 ++++++++++++++++++--- core/util.lua | 6 ++++++ functions/hooks.lua | 9 +++++++-- gumps/janela_principal.lua | 8 +++++--- locales/Details-enUS.lua | 2 +- locales/Details-ptBR.lua | 2 +- 8 files changed, 44 insertions(+), 14 deletions(-) diff --git a/boot.lua b/boot.lua index 8a10dfb6..3c66e04e 100644 --- a/boot.lua +++ b/boot.lua @@ -8,9 +8,9 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.userversion = "v1.9.4" + _detalhes.userversion = "v1.9.5" _detalhes.version = "Alpha 013" - _detalhes.realversion = 13 + _detalhes.realversion = 14 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> initialization stuff diff --git a/classes/classe_instancia.lua b/classes/classe_instancia.lua index 622c9bb9..96550b3a 100644 --- a/classes/classe_instancia.lua +++ b/classes/classe_instancia.lua @@ -267,7 +267,7 @@ end --gump:Fade (self.baseframe.cabecalho.ball, _unpack (_detalhes.windows_fade_out)) --gump:Fade (self.baseframe, _unpack (_detalhes.windows_fade_out)) - gump:Fade (self.baseframe.cabecalho.atributo_icon, 0) + --gump:Fade (self.baseframe.cabecalho.atributo_icon, 0) gump:Fade (self.baseframe.cabecalho.ball, 0) gump:Fade (self.baseframe, 0) @@ -876,13 +876,15 @@ function _detalhes:RestauraJanela (index, temp) self:ReajustaGump() self:SaveMainWindowPosition() + -- chama 6 vezes a função de mudar skin... + self:DefaultIcons (true, true, true, true) self.iniciada = true self:AtivarInstancia (temp) self:ChangeSkin() - + --> all done end diff --git a/core/parser.lua b/core/parser.lua index fc8af1aa..a3680eb6 100644 --- a/core/parser.lua +++ b/core/parser.lua @@ -104,10 +104,12 @@ --> hooks local _hook_cooldowns = false local _hook_deaths = false - local _hook_buffs = false + local _hook_battleress = false + local _hook_buffs = false --[[REMOVED]] local _hook_cooldowns_container = _detalhes.hooks ["HOOK_COOLDOWN"] local _hook_deaths_container = _detalhes.hooks ["HOOK_DEATH"] - local _hook_buffs_container = _detalhes.hooks ["HOOK_BUFF"] + local _hook_battleress_container = _detalhes.hooks ["HOOK_BATTLERESS"] + local _hook_buffs_container = _detalhes.hooks ["HOOK_BUFF"] --[[REMOVED]] @@ -1963,6 +1965,13 @@ end end end + + if (_hook_battleress) then + for _, func in _ipairs (_hook_battleress_container) do + func (nil, token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname) + end + end + end --> actor targets @@ -2773,11 +2782,17 @@ _hook_deaths = false end - if (_detalhes.hooks ["HOOK_BUFF"].enabled) then + if (_detalhes.hooks ["HOOK_BUFF"].enabled) then --[[REMOVED]] _hook_buffs = true else _hook_buffs = false end + + if (_detalhes.hooks ["HOOK_BATTLERESS"].enabled) then + _hook_battleress = true + else + _hook_battleress = false + end return _detalhes:ClearParserCache() end diff --git a/core/util.lua b/core/util.lua index 58b71f11..7337111d 100644 --- a/core/util.lua +++ b/core/util.lua @@ -128,6 +128,12 @@ return 1 + (x - rangeMin) * (scaleMax - scaleMin) / (rangeMax - rangeMin) end + --> font color + function _detalhes:SetFontColor (fontString, r, g, b, a) + r, g, b, a = gump:ParseColors (r, g, b, a) + fontString:SetTextColor (r, g, b, a) + end + --> font size function _detalhes:SetFontSize (fontString, ...) local fonte, _, flags = fontString:GetFont() diff --git a/functions/hooks.lua b/functions/hooks.lua index 2d2cba70..79d1ac65 100644 --- a/functions/hooks.lua +++ b/functions/hooks.lua @@ -7,14 +7,19 @@ --[[global]] DETAILS_HOOK_COOLDOWN = "HOOK_COOLDOWN" --[[global]] DETAILS_HOOK_DEATH = "HOOK_DEATH" - --[[global]] DETAILS_HOOK_BUFF = "HOOK_BUFF" + --[[global]] DETAILS_HOOK_BATTLERESS = "HOOK_BATTLERESS" + + --[[global]] DETAILS_HOOK_BUFF = "HOOK_BUFF" --[[REMOVED--]] + local _detalhes = _G._detalhes local _ _detalhes.hooks ["HOOK_COOLDOWN"] = {} _detalhes.hooks ["HOOK_DEATH"] = {} - _detalhes.hooks ["HOOK_BUFF"] = {} + _detalhes.hooks ["HOOK_BATTLERESS"] = {} + + _detalhes.hooks ["HOOK_BUFF"] = {} --[[REMOVED--]] function _detalhes:InstallHook (hook_type, func) diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index d157944a..4c7b540f 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -3711,7 +3711,7 @@ function _detalhes:ChangeSkin (skin_name) self:SetCloseButtonSettings() --> update toolbar - self:ToolbarSide() + self:ToolbarSide() -- aqui --> update stretch button self:StretchButtonAnchor() @@ -3725,7 +3725,7 @@ function _detalhes:ChangeSkin (skin_name) --> update statusbar if (self.show_statusbar) then - self:ShowStatusBar() + self:ShowStatusBar() -- aqui else self:HideStatusBar() end @@ -3844,6 +3844,7 @@ function _detalhes:ToolbarSide (side) end self:StretchButtonAnchor() + self:HideMainIcon() if (self.show_sidebars) then @@ -3960,11 +3961,12 @@ end function _detalhes:HideMainIcon (value) - if (value == nil) then + if (type (value) ~= "boolean") then value = self.hide_icon end if (value) then + self.hide_icon = true self.baseframe.cabecalho.atributo_icon:Hide() self.baseframe.cabecalho.ball:SetParent (self.baseframe) diff --git a/locales/Details-enUS.lua b/locales/Details-enUS.lua index f6cf49a3..3e11c8f4 100644 --- a/locales/Details-enUS.lua +++ b/locales/Details-enUS.lua @@ -6,7 +6,7 @@ if not Loc then return end - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.9.4|r\n\n|cFFFFFF00-|r Minor bug fixes and improvements on Welcome Screen.\n\n|cFFFFFF00v1.9.3|r\n\n|cFFFFFF00-|r The bar now starts after the icon instead of left window border.\n\n|cFFFFFF00-|r Welcome window now is localizated to others languages\n\n|cFFFFFF00-|r Fixed issue with Damage Rank Plugin.\n\n|cFFFFFF00v1.9.1|r\n\n|cFFFFFF00-|r fixed issue with main window icon when no plugin installed. \n\n|cFFFFFF00-|r fixed issue with some options button text which where out of positioning.\n\n|cFFFFFF00-|r fixed sub menu overlap when near right screen edge.\n\n|cFFFFFF00-|r fixed close button position for default skin.\n\n|cFFFFFF00-|r fixed skin error when selecting solo or right plugins.|cFFFFFF00v1.9.0|r\n\n|cFFFFFF00-|r Fixed minimap icon stuck problem.\n\n|cFFFFFF00-|r Skin support has been rewrite and now is more flexibe.\n\n|cFFFFFF00-|r Added up to 20 new customization options over options panel.\n\n|cFFFFFF00v1.8.4|r\n\n|cFFFFFF00-|r Added slash command 'details reinstall' which cleans Details! config in case of erros.\n\n|cFFFFFF00v1.8.3|r\n\n|cFFFFFF00-|r Added new skin: Simple Gray.\n\n|cFFFFFF00-|r Added minimap and interface addon panel buttons.\n\n|cFFFFFF00-|r Added new tutorials bubbles for basic aspects of Details! window.\n\n|cFFFFFF00-|r Fixed a issue with Panic Mode where sometimes his isnt triggered.\n\n|cFFFFFF00v1.8.0|r\n\n|cFFFFFF00-|r Added a new plugin: You Are Not Prepared.\n\n|cFFFFFF00-|r New options panel!\n\n|cFFFFFF00v1.7.0|r\n\n- Fixed some colors issues with enimies bars.\n\n|cFFFFFF00-|r Fixed some phrases which isn't still not translated to enUS.\n\n|cFFFFFF00-|r Major rewrite on CC-Breaks, now it's working properly.\n\n|cFFFFFF00-|r Added new sub attribute for damage: Voidzones & Debuffs.|cFFFFFF00v1.6.7|r\n\n- Added support to skins, you can change over options panel.\n\n|cFFFFFF00v1.6.5|r\n\n|cFFFFFF00-|r Added sub attribute 'Enemies' which shows, of course, only enemies.\n\n|cFFFFFF00-|r Fixed issue with successful spell cast.\n\n|cFFFFFF00v1.6.3|r\n\n|cFFFFFF00-|r data capture now runs 4% faster.\n\n|cFFFFFF00-|r Fixed issue with pets were wasn't uptading owner activity time.\n\n|cFFFFFF00-|r Fixed healing being counted even out of combat.\n\n|cFFFFFF00-|r Fixed some problems with multi-boss encountes like Twin Consorts.\n\n|cFFFFFF00-|r Added options for concatenate trash segments.\n\n|cFFFFFF00-|r Added options for auto remove trash segments. \n\n|cFFFFFF00-|r Added options for change bar height. \n\n|cFFFFFF00-|r Encounter Details now display how many interrupted and successful cast of a boss skill." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.9.5|r\n\n|cFFFFFF00-More fixes on Skins support and new tools for plugins.|r\n\n|cFFFFFF00v1.9.4|r\n\n|cFFFFFF00-|r Minor bug fixes and improvements on Welcome Screen.\n\n|cFFFFFF00v1.9.3|r\n\n|cFFFFFF00-|r The bar now starts after the icon instead of left window border.\n\n|cFFFFFF00-|r Welcome window now is localizated to others languages\n\n|cFFFFFF00-|r Fixed issue with Damage Rank Plugin.\n\n|cFFFFFF00v1.9.1|r\n\n|cFFFFFF00-|r fixed issue with main window icon when no plugin installed. \n\n|cFFFFFF00-|r fixed issue with some options button text which where out of positioning.\n\n|cFFFFFF00-|r fixed sub menu overlap when near right screen edge.\n\n|cFFFFFF00-|r fixed close button position for default skin.\n\n|cFFFFFF00-|r fixed skin error when selecting solo or right plugins.|cFFFFFF00v1.9.0|r\n\n|cFFFFFF00-|r Fixed minimap icon stuck problem.\n\n|cFFFFFF00-|r Skin support has been rewrite and now is more flexibe.\n\n|cFFFFFF00-|r Added up to 20 new customization options over options panel.\n\n|cFFFFFF00v1.8.4|r\n\n|cFFFFFF00-|r Added slash command 'details reinstall' which cleans Details! config in case of erros.\n\n|cFFFFFF00v1.8.3|r\n\n|cFFFFFF00-|r Added new skin: Simple Gray.\n\n|cFFFFFF00-|r Added minimap and interface addon panel buttons.\n\n|cFFFFFF00-|r Added new tutorials bubbles for basic aspects of Details! window.\n\n|cFFFFFF00-|r Fixed a issue with Panic Mode where sometimes his isnt triggered.\n\n|cFFFFFF00v1.8.0|r\n\n|cFFFFFF00-|r Added a new plugin: You Are Not Prepared.\n\n|cFFFFFF00-|r New options panel!\n\n|cFFFFFF00v1.7.0|r\n\n- Fixed some colors issues with enimies bars.\n\n|cFFFFFF00-|r Fixed some phrases which isn't still not translated to enUS.\n\n|cFFFFFF00-|r Major rewrite on CC-Breaks, now it's working properly.\n\n|cFFFFFF00-|r Added new sub attribute for damage: Voidzones & Debuffs.|cFFFFFF00v1.6.7|r\n\n- Added support to skins, you can change over options panel.\n\n|cFFFFFF00v1.6.5|r\n\n|cFFFFFF00-|r Added sub attribute 'Enemies' which shows, of course, only enemies.\n\n|cFFFFFF00-|r Fixed issue with successful spell cast.\n\n|cFFFFFF00v1.6.3|r\n\n|cFFFFFF00-|r data capture now runs 4% faster.\n\n|cFFFFFF00-|r Fixed issue with pets were wasn't uptading owner activity time.\n\n|cFFFFFF00-|r Fixed healing being counted even out of combat.\n\n|cFFFFFF00-|r Fixed some problems with multi-boss encountes like Twin Consorts.\n\n|cFFFFFF00-|r Added options for concatenate trash segments.\n\n|cFFFFFF00-|r Added options for auto remove trash segments. \n\n|cFFFFFF00-|r Added options for change bar height. \n\n|cFFFFFF00-|r Encounter Details now display how many interrupted and successful cast of a boss skill." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails:|r " --> color and details name diff --git a/locales/Details-ptBR.lua b/locales/Details-ptBR.lua index 9979440d..b51ac0ff 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"] = "|cFFFFFF00v1.9.4|r\n\n|cFFFFFF00-|r Pequenas correcoes e melhorias na tela de boas vindas.\n\n|cFFFFFF00v1.9.3|r\n\n|cFFFFFF00-|r A barra agora comeca apos o icone e nao mais na borda esquerda da janela.\n\n|cFFFFFF00-|r Janela de boas vindas agora esta traduzida para outros idiomas.\n\n|cFFFFFF00-|r Corrigido o problema que estava afetando o plugin de Rank de Dano.\n\n|cFFFFFF00v1.9.1|r\n\n|cFFFFFF00-|r corrigido problema do icone na janela principal quando nao havia nenhum plugin instalado. \n\n|cFFFFFF00-|r corrigido problema com alguns botoes no painel de opcoes onde o texto estava fora do lugar.\n\n|cFFFFFF00-|r corrigido a posicao dos sub menus quando proximos a borda direita do monitor.\n\n|cFFFFFF00-|r corrigida a posicao do botao de fechar do skin padrao.\n\n|cFFFFFF00-|r corrigido um erro nas skins ao selecionar um plugin de raide ou solo.|cFFFFFF00v1.9.0|r\n\n|cFFFFFF00-|r Corrigido o problema de nao movimentar o botao no minimapa.\n\n|cFFFFFF00-|r Suporte a skins foi reescrito e agora ficou mais flexivel.\n\n|cFFFFFF00-|r Adicionadas mais de 20 opcoes de customizacao no painel de opcoes.\n\n|cFFFFFF00v1.8.4|r\n\n|cFFFFFF00-|r Adicionado comando 'details reinstalar' no qual limpa a configuracao do Details! em caso de erros.\n\n|cFFFFFF00v1.8.3|r\n\n|cFFFFFF00-|r Adicionada nova skin: Simple Gray.\n\n|cFFFFFF00-|r Adicionado botoes para o Details! no minimapa e menu de addons no painel de intercace.\n\n|cFFFFFF00-|r Adicionados novas bolhas de tutoriais para aspectos basicos das janelas do Details!.\n\n|cFFFFFF00-|r Corrigido o Modo Panico aonde as vezes ele nao era disparado.\n\n|cFFFFFF00v1.8.0|r\n\n- Adicionado novo plugin: You Are Not Prepared.\n\n|cFFFFFF00-|r Novo painel de opcoes!\n\n|cFFFFFF00v1.7.0|r\n\n- Corrigido alguns problemas com as cores das barras de inimigos.\n\n|cFFFFFF00-|r CC Quebrado foi inteiramente reescrito e agora deve funcionar corretamente.\n\n|cFFFFFF00-|r Adicionado novo sub atributo ao dano: Voidzones & Debuffs.|cFFFFFF00v1.6.7|r\n\n- Adicionado suporte a skins, troque ela atraves do painel de opcoes.\n\n|cFFFFFF00v1.6.5|r\n\n|cFFFFFF00-|r Adicionado o sub atributo 'Inimigos' que mostra, eh claro, somente inimigos.\n\n|cFFFFFF00-|r Corrigido um problema na captura das magias conjuradas.|cFFFFFF00v1.6.3|r\n\n|cFFFFFF00-|r captura de dados agora roda 4% mais rapido.\n\n|cFFFFFF00-|r Corrigido problema onde os ajudantes nao atualizavam o tempo de atividade do dono.\n\n|cFFFFFF00-|r Corrigido problema onde o healing era contado mesmo fora do combate.\n\n|cFFFFFF00-|r Corrigido problema com chefes multiplos como Twin Consorts.\n\n|cFFFFFF00-|r Adicionada opcao para juntar os segmentos de trash mobs.\n\n|cFFFFFF00-|r Adicionada opcao para auto remover os segmentos de trash mobs. \n\n|cFFFFFF00-|r Adicionada opcao para alterar a altura das barras.\n\n|cFFFFFF00-|r Plugin Encounter Details agora mostra quantos cast bem sucedidos as magias interrompidas tiveram." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.9.5|r\n\n|cFFFFFF00-Mais correcoes para as Skins e suporte a novos plugins.|r\n\n|cFFFFFF00v1.9.4|r\n\n|cFFFFFF00-|r Pequenas correcoes e melhorias na tela de boas vindas.\n\n|cFFFFFF00v1.9.3|r\n\n|cFFFFFF00-|r A barra agora comeca apos o icone e nao mais na borda esquerda da janela.\n\n|cFFFFFF00-|r Janela de boas vindas agora esta traduzida para outros idiomas.\n\n|cFFFFFF00-|r Corrigido o problema que estava afetando o plugin de Rank de Dano.\n\n|cFFFFFF00v1.9.1|r\n\n|cFFFFFF00-|r corrigido problema do icone na janela principal quando nao havia nenhum plugin instalado. \n\n|cFFFFFF00-|r corrigido problema com alguns botoes no painel de opcoes onde o texto estava fora do lugar.\n\n|cFFFFFF00-|r corrigido a posicao dos sub menus quando proximos a borda direita do monitor.\n\n|cFFFFFF00-|r corrigida a posicao do botao de fechar do skin padrao.\n\n|cFFFFFF00-|r corrigido um erro nas skins ao selecionar um plugin de raide ou solo.|cFFFFFF00v1.9.0|r\n\n|cFFFFFF00-|r Corrigido o problema de nao movimentar o botao no minimapa.\n\n|cFFFFFF00-|r Suporte a skins foi reescrito e agora ficou mais flexivel.\n\n|cFFFFFF00-|r Adicionadas mais de 20 opcoes de customizacao no painel de opcoes.\n\n|cFFFFFF00v1.8.4|r\n\n|cFFFFFF00-|r Adicionado comando 'details reinstalar' no qual limpa a configuracao do Details! em caso de erros.\n\n|cFFFFFF00v1.8.3|r\n\n|cFFFFFF00-|r Adicionada nova skin: Simple Gray.\n\n|cFFFFFF00-|r Adicionado botoes para o Details! no minimapa e menu de addons no painel de intercace.\n\n|cFFFFFF00-|r Adicionados novas bolhas de tutoriais para aspectos basicos das janelas do Details!.\n\n|cFFFFFF00-|r Corrigido o Modo Panico aonde as vezes ele nao era disparado.\n\n|cFFFFFF00v1.8.0|r\n\n- Adicionado novo plugin: You Are Not Prepared.\n\n|cFFFFFF00-|r Novo painel de opcoes!\n\n|cFFFFFF00v1.7.0|r\n\n- Corrigido alguns problemas com as cores das barras de inimigos.\n\n|cFFFFFF00-|r CC Quebrado foi inteiramente reescrito e agora deve funcionar corretamente.\n\n|cFFFFFF00-|r Adicionado novo sub atributo ao dano: Voidzones & Debuffs.|cFFFFFF00v1.6.7|r\n\n- Adicionado suporte a skins, troque ela atraves do painel de opcoes.\n\n|cFFFFFF00v1.6.5|r\n\n|cFFFFFF00-|r Adicionado o sub atributo 'Inimigos' que mostra, eh claro, somente inimigos.\n\n|cFFFFFF00-|r Corrigido um problema na captura das magias conjuradas.|cFFFFFF00v1.6.3|r\n\n|cFFFFFF00-|r captura de dados agora roda 4% mais rapido.\n\n|cFFFFFF00-|r Corrigido problema onde os ajudantes nao atualizavam o tempo de atividade do dono.\n\n|cFFFFFF00-|r Corrigido problema onde o healing era contado mesmo fora do combate.\n\n|cFFFFFF00-|r Corrigido problema com chefes multiplos como Twin Consorts.\n\n|cFFFFFF00-|r Adicionada opcao para juntar os segmentos de trash mobs.\n\n|cFFFFFF00-|r Adicionada opcao para auto remover os segmentos de trash mobs. \n\n|cFFFFFF00-|r Adicionada opcao para alterar a altura das barras.\n\n|cFFFFFF00-|r Plugin Encounter Details agora mostra quantos cast bem sucedidos as magias interrompidas tiveram." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetalhes:|r " --> color and details name