From 64d71d1c75dca4e1df588f5fa819e285d0876c08 Mon Sep 17 00:00:00 2001 From: tercio Date: Wed, 12 Mar 2014 15:51:31 -0300 Subject: [PATCH] . --- boot.lua | 4 +-- core/control.lua | 31 +++++++++++++++++ core/parser.lua | 1 + core/plugins_solo.lua | 1 - functions/boss.lua | 5 +++ functions/skins.lua | 34 +++++++++++++++++++ gumps/janela_options.lua | 13 +++++-- locales/Details-enUS.lua | 2 +- locales/Details-ptBR.lua | 2 +- .../SiegeOfOrgrimmar.lua | 12 +++++++ 10 files changed, 97 insertions(+), 8 deletions(-) diff --git a/boot.lua b/boot.lua index 74eef82d..fb47d725 100644 --- a/boot.lua +++ b/boot.lua @@ -2,13 +2,13 @@ --Last Modification: 27/07/2013 -- Change Log: -- 27/07/2013: Finished alpha version. - + ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> global name declaration _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.userversion = "v1.11.0" + _detalhes.userversion = "v1.11.2" _detalhes.version = "Alpha 015" _detalhes.realversion = 15 diff --git a/core/control.lua b/core/control.lua index 635877c7..bf21ee08 100644 --- a/core/control.lua +++ b/core/control.lua @@ -82,6 +82,11 @@ -- try get the current encounter name during the encounter function _detalhes:ReadBossFrames() + + if (_detalhes.tabela_vigente.is_boss) then + return --no need to check + end + for index = 1, 5, 1 do if (_UnitExists ("boss"..index)) then local guid = _UnitGUID ("boss"..index) @@ -321,7 +326,33 @@ --> pega a zona do jogador e vê se foi uma luta contra um Boss -- identifica se a luta foi com um boss if (not _detalhes.tabela_vigente.is_boss) then + + --> function which runs after a boss encounter to try recognize a encounter _detalhes.tabela_vigente.is_boss = _detalhes:FindBoss() + + if (not _detalhes.tabela_vigente.is_boss) then + + local ZoneName, _, DifficultyID, _, _, _, _, ZoneMapID = _GetInstanceInfo() + + local findboss = _detalhes:GetRaidBossFindFunction (ZoneMapID) + if (findboss) then + local BossIndex = findboss() + if (BossIndex) then + _detalhes.tabela_vigente.is_boss = { + index = BossIndex, + name = _detalhes:GetBossName (ZoneMapID, BossIndex), + zone = ZoneName, + mapid = ZoneMapID, + encounter = _detalhes:GetBossName (ZoneMapID, BossIndex), + diff = DifficultyID + } + --print ("boss found using findboss function.") + else + --print ("boss not found") + end + end + end + end if (_detalhes.tabela_vigente.bossFunction) then diff --git a/core/parser.lua b/core/parser.lua index 1c012beb..fa4aaa53 100644 --- a/core/parser.lua +++ b/core/parser.lua @@ -2551,6 +2551,7 @@ if (_detalhes.EncounterInformation [_detalhes.zone_id]) then _detalhes:ScheduleTimer ("ReadBossFrames", 1) + _detalhes:ScheduleTimer ("ReadBossFrames", 30) end if (not _detalhes:CaptureGet ("damage")) then diff --git a/core/plugins_solo.lua b/core/plugins_solo.lua index 78f10f8b..7a413d66 100644 --- a/core/plugins_solo.lua +++ b/core/plugins_solo.lua @@ -170,7 +170,6 @@ if (#_detalhes.SoloTables.Plugins > 0) then --> have at least one plugin _detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].Frame:Hide() end - _detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].Frame:Hide() return end diff --git a/functions/boss.lua b/functions/boss.lua index 31b00ad9..4cbaf3a9 100644 --- a/functions/boss.lua +++ b/functions/boss.lua @@ -35,6 +35,11 @@ do return end + --> generic boss find function + function _detalhes:GetRaidBossFindFunction (mapid) + return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].find_boss_encounter + end + --> return if the boss need sync function _detalhes:GetEncounterEqualize (mapid, bossindex) return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters [bossindex] and _detalhes.EncounterInformation [mapid].encounters [bossindex].equalize diff --git a/functions/skins.lua b/functions/skins.lua index e45a4f2f..ea990094 100644 --- a/functions/skins.lua +++ b/functions/skins.lua @@ -147,4 +147,38 @@ local _ } }) + + --[[ + + --> install default skins: + _detalhes:InstallSkin ("Imperial Skin", { + file = "Interface\\AddOns\\Details\\images\\skins\\imperial_skin", + author = "Details!", + version = "1.0", + site = "unknown", + desc = "default skin for Details!", + can_change_alpha_head = false, + icon_anchor_main = {-1, 1}, + icon_anchor_plugins = {-9, -7}, + icon_plugins_size = {19, 19}, + + -- the four anchors: + icon_point_anchor = {-37, 0}, + left_corner_anchor = {-107, 0}, + close_button_anchor = {5, -7}, + right_corner_anchor = {96, 0}, + + icon_point_anchor_bottom = {-37, 0}, + left_corner_anchor_bottom = {-107, 0}, + close_button_anchor_bottom = {5, 6}, + right_corner_anchor_bottom = {96, 0}, + + instance_cprops = { + menu_anchor = {5, 1}, + hide_icon = true, + } + + }) + + --]] \ No newline at end of file diff --git a/gumps/janela_options.lua b/gumps/janela_options.lua index a2b0e1bb..e97a75dc 100644 --- a/gumps/janela_options.lua +++ b/gumps/janela_options.lua @@ -131,13 +131,20 @@ function _detalhes:OpenOptionsWindow (instance) if (modo == 1) then --alone atributo = _detalhes.SoloTables.Mode or 1 local SoloInfo = _detalhes.SoloTables.Menu [atributo] - InstanceList [#InstanceList+1] = {value = index, label = "#".. index .. " " .. SoloInfo [1], onclick = onSelectInstance, icon = SoloInfo [2]} + if (SoloInfo) then + InstanceList [#InstanceList+1] = {value = index, label = "#".. index .. " " .. SoloInfo [1], onclick = onSelectInstance, icon = SoloInfo [2]} + else + InstanceList [#InstanceList+1] = {value = index, label = "#".. index .. " unknown", onclick = onSelectInstance, icon = ""} + end elseif (modo == 4) then --raid atributo = _detalhes.RaidTables.Mode or 1 local RaidInfo = _detalhes.RaidTables.Menu [atributo] - InstanceList [#InstanceList+1] = {value = index, label = "#".. index .. " " .. RaidInfo [1], onclick = onSelectInstance, icon = RaidInfo [2]} - + if (RaidInfo) then + InstanceList [#InstanceList+1] = {value = index, label = "#".. index .. " " .. RaidInfo [1], onclick = onSelectInstance, icon = RaidInfo [2]} + else + InstanceList [#InstanceList+1] = {value = index, label = "#".. index .. " unknown", onclick = onSelectInstance, icon = ""} + end else InstanceList [#InstanceList+1] = {value = index, label = "#".. index .. " " .. _detalhes.atributos.lista [atributo] .. " - " .. _detalhes.sub_atributos [atributo].lista [sub_atributo], onclick = onSelectInstance, icon = _detalhes.sub_atributos [atributo].icones[sub_atributo] [1], texcoord = _detalhes.sub_atributos [atributo].icones[sub_atributo] [2]} diff --git a/locales/Details-enUS.lua b/locales/Details-enUS.lua index ce864f48..fd4fb416 100644 --- a/locales/Details-enUS.lua +++ b/locales/Details-enUS.lua @@ -2,7 +2,7 @@ local Loc = LibStub("AceLocale-3.0"):NewLocale("Details", "enUS", true) if not Loc then return end -------------------------------------------------------------------------------------------------------------------------------------------- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.11.0|r\n\n|cFFFFFF00-|r Added an option for abbreviate Dps and Hps.\n\n|cFFFFFF00-|r Fixed issue where the window icon fade away when reopening the window.\n\n|cFFFFFF00-|r Improvements in class recognition.\n\n|cFFFFFF00-|r Added follow spells as defensive cooldowns:\nHealing Tide Totem, Spirit Link Totem, Demoralizing Banner, Mass Spell Reflection and Shield Block.\n\n|cFFFFFF00-|r More improvements done in Encounter Details plugin.\n\n|cFFFFFF00-|r Improvements made in the downloadable plugins: Timeline and Advanced Death Logs.\n\n|cFFFFFF00v1.10.0|r\n\n|cFFFFFF00-|r Fixed a issue with overall data Dps when have only one segment.\n\n|cFFFFFF00-|r Changed colors and added some backgrounds for menus.\n\n|cFFFFFF00-|r Options panel has his height size increased.\n\n|cFFFFFF00-|r Added options for hide the window or change the transparency when in combat.\n\n|cFFFFFF00-|r Added a control panel for plugins, where you can enable or disable then.\n\n|cFFFFFF00v1.9.5|r\n\n|cFFFFFF00-|r 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." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.11.2|r\n\n|cFFFFFF00-|r Fixed bugs where Details! stop working if no plugin is actived on Wow addon panel.\n\n|cFFFFFF00v1.11.0|r\n\n|cFFFFFF00-|r Added an option for abbreviate Dps and Hps.\n\n|cFFFFFF00-|r Fixed issue where the window icon fade away when reopening the window.\n\n|cFFFFFF00-|r Improvements in class recognition.\n\n|cFFFFFF00-|r Added follow spells as defensive cooldowns:\nHealing Tide Totem, Spirit Link Totem, Demoralizing Banner, Mass Spell Reflection and Shield Block.\n\n|cFFFFFF00-|r More improvements done in Encounter Details plugin.\n\n|cFFFFFF00-|r Improvements made in the downloadable plugins: Timeline and Advanced Death Logs.\n\n|cFFFFFF00v1.10.0|r\n\n|cFFFFFF00-|r Fixed a issue with overall data Dps when have only one segment.\n\n|cFFFFFF00-|r Changed colors and added some backgrounds for menus.\n\n|cFFFFFF00-|r Options panel has his height size increased.\n\n|cFFFFFF00-|r Added options for hide the window or change the transparency when in combat.\n\n|cFFFFFF00-|r Added a control panel for plugins, where you can enable or disable then.\n\n|cFFFFFF00v1.9.5|r\n\n|cFFFFFF00-|r 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." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails:|r " --> color and details name diff --git a/locales/Details-ptBR.lua b/locales/Details-ptBR.lua index 2b9c40a6..dc3d2f2e 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.11.0|r\n\n|cFFFFFF00-|r Adicionado opcao para abreviar o Dps e o Hps.\n\n|cFFFFFF00-|r Corrigido um problema onde o icone da janela desaparecia ao reabri-la.\n\n|cFFFFFF00-|r Melhorias no reconhecimento das classes.\n\n|cFFFFFF00-|r As seguintes magias foram adicionadas como cooldowns: Healing Tide Totem, Spirit Link Totem, Demoralizing Banner, Mass Spell Reflection and Shield Block.\n\n|cFFFFFF00-|r Mais melhorias feitas no plugin Encounter Details.\n\n|cFFFFFF00-|r Melhorias feitas nos plugins disponiveis para download: Timeline e Advanced Death Logs.\n\n|cFFFFFF00v1.10.0|r\n\n|cFFFFFF00-|r Corrigido um problema no Dps no segmento total quando existia apenas 1 segmento.\n\n|cFFFFFF00-|r Cores e imagem de fundo dos menus foram alterados.\n\n|cFFFFFF00-|r A altura do painel de opcoes foi aumentada.\n\n|cFFFFFF00-|r Adicionada opcao para esconder ou alterar a transparencia da janela quando estiver em combate.\n\n|cFFFFFF00-|r Adicionado um painel de controle de plugins para ativar ou desativa-los.\n\n|cFFFFFF00v1.9.5|r\n\n|cFFFFFF00-|rMais 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." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.11.2|r\n\n|cFFFFFF00-|r Corrigido problemas onde o Details! parava de funcionar se nenhum plugin estiver ligado no painel de addons do Wow.|cFFFFFF00v1.11.0|r\n\n|cFFFFFF00-|r Adicionado opcao para abreviar o Dps e o Hps.\n\n|cFFFFFF00-|r Corrigido um problema onde o icone da janela desaparecia ao reabri-la.\n\n|cFFFFFF00-|r Melhorias no reconhecimento das classes.\n\n|cFFFFFF00-|r As seguintes magias foram adicionadas como cooldowns: Healing Tide Totem, Spirit Link Totem, Demoralizing Banner, Mass Spell Reflection and Shield Block.\n\n|cFFFFFF00-|r Mais melhorias feitas no plugin Encounter Details.\n\n|cFFFFFF00-|r Melhorias feitas nos plugins disponiveis para download: Timeline e Advanced Death Logs.\n\n|cFFFFFF00v1.10.0|r\n\n|cFFFFFF00-|r Corrigido um problema no Dps no segmento total quando existia apenas 1 segmento.\n\n|cFFFFFF00-|r Cores e imagem de fundo dos menus foram alterados.\n\n|cFFFFFF00-|r A altura do painel de opcoes foi aumentada.\n\n|cFFFFFF00-|r Adicionada opcao para esconder ou alterar a transparencia da janela quando estiver em combate.\n\n|cFFFFFF00-|r Adicionado um painel de controle de plugins para ativar ou desativa-los.\n\n|cFFFFFF00v1.9.5|r\n\n|cFFFFFF00-|rMais 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." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetalhes:|r " --> color and details name diff --git a/plugins/Details_RaidInfo-SiegeOfOrgrimmar/SiegeOfOrgrimmar.lua b/plugins/Details_RaidInfo-SiegeOfOrgrimmar/SiegeOfOrgrimmar.lua index 0aa21798..5f42ff55 100644 --- a/plugins/Details_RaidInfo-SiegeOfOrgrimmar/SiegeOfOrgrimmar.lua +++ b/plugins/Details_RaidInfo-SiegeOfOrgrimmar/SiegeOfOrgrimmar.lua @@ -41,6 +41,18 @@ local siege_of_orgrimmar = { "Garrosh Hellscream" }, + find_boss_encounter = function() + --> find galakras (this encounter doesn't have a boss frames before galakras comes into in play) + if (_detalhes.tabela_vigente and _detalhes.tabela_vigente[1] and _detalhes.tabela_vigente[1]._ActorTable) then + for _, damage_actor in ipairs (_detalhes.tabela_vigente[1]._ActorTable) do + local serial = tonumber (damage_actor.serial:sub (6, 10), 16) + if (serial == 73909) then --Archmage Aethas Sunreaver + return 5 --> galakras boss index + end + end + end + end, + boss_ids = { -- Vale of Eternal Sorrows [71543] = 1, -- Immerseus