From 6fab96bf5c8946d3e4a6651fc0344ff40d7ddc1b Mon Sep 17 00:00:00 2001 From: tercio Date: Sat, 9 Aug 2014 13:48:44 -0300 Subject: [PATCH] - Few improvements on damage -> frags display. - Welcome window strings passed to curseforge localization tool. --- boot.lua | 6 +- classes/classe_combate.lua | 1 + classes/classe_damage.lua | 46 +++++++++++---- functions/profiles.lua | 3 + gumps/janela_welcome.lua | 114 ------------------------------------- startup.lua | 10 ++-- 6 files changed, 47 insertions(+), 133 deletions(-) diff --git a/boot.lua b/boot.lua index 89bf0c7f..6ec9d975 100644 --- a/boot.lua +++ b/boot.lua @@ -4,8 +4,8 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.build_counter = 20 --it's 30 for release - _detalhes.userversion = "v1.21.3" + _detalhes.build_counter = 32 --it's 32 for release + _detalhes.userversion = "v1.21.4" _detalhes.realversion = 25 _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" @@ -35,7 +35,7 @@ do |cFFFFFF00-|r Fixed few bugs with scroll bars, including scrolls on dropdown menu and player detail window |cFF999999(thanks @Revi-mmochampion forum)|r.\n\n --]] - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00a1.21.3 (|cFFFFCC00Ago 8, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Shaman's Ancestral Guidance on cooldowns list |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Added a profile selection screen when Details! are running for the first time on a character.\n\n|cFFFFFF00-|r Added Menu Text Size option over miscellaneous section on options panel |cFF999999(thanks @ Revi-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed a bug over Healing Player Details Window where pets wasn't being shown |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed issue with summoning pets with unknown owners where it was breaking the summon of all the others pets. |cFF999999(thanks @ThunderLost-curse website)|r.\n\n|cFFFFFF00-|r Hot Corners isn't no more a part of Details!, instead of that, Hot Corner is now a standalone addon which needs to be installed separately for who wants to use it.\n\n|cFFFFFF00-|r Skin data is now stored inside the profiles, many code parts got rewrite, still may have few bugs but it's more reliable then before.\n\n|cFFFFFF00-|r Rework on Auras and Voidzones: now shows damage, dps and percentage. Also its tooltip got fixes and now shows the correct damage done to players.\n\n|cFFFFFF00-|r Tooltip for Enemies now shows damage taken from players |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00-|r Right clicking a real-time enemy bar, makes it back to Enemies display instead of show Bookmark panel |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00-|r Tank comparison from previous segment now uses the same percentage method from player comparison panel.\n\n|cFFFFFF00-|r Fix bug with the slash command 'show' where was ignoring the window limit set on options panel |cFF999999(thanks @Castiel-US-Azralon realm)|r.\n\n|cFFFFFF00-|r Fixed few bugs with scroll bars, including scrolls on dropdown menu and player detail window |cFF999999(thanks @Revi-mmochampion forum)|r.\n\n|cFFFFFF00v1.20.2 (|cFFFFCC00Aug 1, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a option under Miscellaneous section to provide spell link instead of spell name for helpful spells when reporting a death |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Improvements done on how deaths are handled, now latest events before death will be more precise.\n\n|cFFFFFF00-|r Implemented Damage Taken from environment like lava, gravity, etc.\n\n|cFFFFFF00-|r Added Warlock's Fire and Brimstone spell on customized spells.\n\n|cFFFFFF00-|r Added dwarf racial Stone Form on cooldown list |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Bookmark now are shared between all characters.\n\n|cFFFFFF00-|r Fixed few inconsistencies with trash recognition.\n\n|cFFFFFF00-|r Fixed Cloud Capture where sometimes it wasn't sharing.\n\n|cFFFFFF00-|r Fixed report where it wasn't sharing for guild and raid when the player name box were empty.\n\n|cFFFFFF00-|r Report box now also saves the position and the last channel used to report |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r You Are Not Prepared plugin now have tooltips for spells and its window auto opens after a boss encounter.\n\n|cFFFFFF00-|r Advanced Death Logs plugin got full rewrite (and still are in development).\n\n|cFFFFFF00v1.19.0 - v1.19.1 - v1.19.2 (|cFFFFCC00Jul 21, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Details! is now able to be translated by its community for all supported languages through Curse Forge Web Site:\n\n|cFFFFFF00http://wow.curseforge.com/addons/details/localization/|r\n\n|cFFFFFF00-|r Slash commands now are multi language, accepting both english and the localized language.\n\n|cFFFFFF00-|r Added Data Broker for: Combat Time, Player Dps and Player Hps.\n\n|cFFFFFF00-|r Rework on plugins: Timeline, You Are Not Prepared, Tiny Threat, Encounter Details. All those plugins got a options panel and few improvaments.\n\n|cFFFFFF00-|r Trash segments won't be saved anymore.\n\n|cFFFFFF00-|r Added support for plugins options.\n\n|cFFFFFF00-|r Revamp on Deaths report lines, adding links for harmful spells and changing the text order |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Modified the percentage used on Comparison panel |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed the Raid Dps and Hps data exported by Data Broker |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00v1.18.4 - v1.18.5 - v1.18.6 (|cFFFFCC00Jul 13, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added option to customize the bar left text.\n\n|cFFFFFF00-|r Added option for show or hide bar placement number.\n\n|cFFFFFF00-|r Spell icon is shown in the bar when the enemy character is a environment spell type.\n\n|cFFFFFF00-|r Changed the non-player enemy icon (monsters).\n\n|cFFFFFF00-|r Fixed bug on flex performance profile |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Added new version tracker which should alert you when a newer Details! version is found.\n\n|cFFFFFF00-|r Added Enemy Damage Taken by clicking with middle mouse button over a enemy bar (enemies display).\n\n|cFFFFFF00-|r Added import/export for saved skins and custom displays created.\n\n|cFFFFFF00-|r Small changes on ElvUI Frame Style skin (need reaply).\n\n|cFFFFFF00-|r Fixed the death recognition for bosses, now it should show the correct color over segments menu.\n\n|cFFFFFF00-|r Fixed Dps inacuracy when plyaing solo (no party or raid group).\n\n|cFFFFFF00-|r Fixed the duration time of buffs applied before the pull, like pre-potions.\n\n|cFFFFFF00v1.17.5 (|cFFFFCC00Jun 30, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Shortcut panel is now known as Bookmarks and a revamp has done on its panel.\n\n|cFFFFFF00-|r NickTag now doesnt check anymore if a received nickname from other guild member is invalid.\n\n|cFFFFFF00-|r Healthstone now is considered a cooldown.\n\n|cFFFFFF00-|r Few improvements on Default Skin, Minimalistic Skin and ElvUI Frame Style Skin.\n\n|cFFFFFF00-|r Revamp on Image Editor, many bugs solves and now it is usable.\n\n|cFFFFFF00-|r 'Hide' slash command now hides all opened windows; 'Show', open all closed windows and 'New' create a new window.\n\n|cFFFFFF00-|r Added Devotion Aura, Rallying Cry as cooldowns.\n\n|cFFFFFF00-|r Added options for lock, unlock, break snap, close, reopen and create new window.\n\n|cFFFFFF00-|r Added a options panel for HotCorners, access it through options button or slash hotcorner command.\n\n|cFFFFFF00-|r Added 'Logos' and 'Raid & Dungeons' sections for Wallpapers. \n\n|cFFFFFF00-|r Added a option to load a image from the computer to use as wallpaper.\n\n|cFFFFFF00-|r Fixed the percent issue with Healing Done and HPS while in combat.\n\n|cFFFFFF00-|r Fixed non-combat switch by role where changing role wasnt changing the shown attribute.\n\n|cFFFFFF00-|r Fixed 'While in Combat' hiding schema |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed several bugs on Interact Auto Transparency.\n\n|cFFFFFF00-|r Fixed the report window alert when opening the report window and it already is opened |cFF999999(thanks @Rasstapp-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed the gap between last row created and the end of the window.\n\n|cFFFFFF00-|r Fixed all tooltips bugs on Wallpaper Section on Options Panel.\n\n|cFFFFFF00a1.17.0 (|cFFFFCC00Jun 21, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Support for Custom Displays has been rewrited, to access the new panel go to Sword Menu -> Custom -> Create New Display.\n\n|cFFFFFF00-|r Added a custom display for show potion usage.\n\n|cFFFFFF00-|r Fixed a bug where the player pet wasnt being tracked after logon in the game. This bug was affecting directly classes with pets playing out of a raid group.\n\n|cFFFFFF00-|r Fixed the report bug on healing, energy and misc attributes |cFF999999(thanks @skmzarn-mmochampion forum)|r." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.21.4 (|cFFFFCC00Ago 9, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Shaman's Ancestral Guidance on cooldowns list |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Added a profile selection screen when Details! are running for the first time on a character.\n\n|cFFFFFF00-|r Added Menu Text Size option over miscellaneous section on options panel |cFF999999(thanks @ Revi-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed a bug over Healing Player Details Window where pets wasn't being shown |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed issue with summoning pets with unknown owners where it was breaking the summon of all the others pets. |cFF999999(thanks @ThunderLost-curse website)|r.\n\n|cFFFFFF00-|r Hot Corners isn't no more a part of Details!, instead of that, Hot Corner is now a standalone addon which needs to be installed separately for who wants to use it.\n\n|cFFFFFF00-|r Skin data is now stored inside the profiles, many code parts got rewrite, still may have few bugs but it's more reliable then before.\n\n|cFFFFFF00-|r Rework on Auras and Voidzones: now shows damage, dps and percentage. Also its tooltip got fixes and now shows the correct damage done to players.\n\n|cFFFFFF00-|r Tooltip for Enemies now shows damage taken from players |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00-|r Right clicking a real-time enemy bar, makes it back to Enemies display instead of show Bookmark panel |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00-|r Tank comparison from previous segment now uses the same percentage method from player comparison panel.\n\n|cFFFFFF00-|r Fix bug with the slash command 'show' where was ignoring the window limit set on options panel |cFF999999(thanks @Castiel-US-Azralon realm)|r.\n\n|cFFFFFF00-|r Fixed few bugs with scroll bars, including scrolls on dropdown menu and player detail window |cFF999999(thanks @Revi-mmochampion forum)|r.\n\n|cFFFFFF00v1.20.2 (|cFFFFCC00Aug 1, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a option under Miscellaneous section to provide spell link instead of spell name for helpful spells when reporting a death |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Improvements done on how deaths are handled, now latest events before death will be more precise.\n\n|cFFFFFF00-|r Implemented Damage Taken from environment like lava, gravity, etc.\n\n|cFFFFFF00-|r Added Warlock's Fire and Brimstone spell on customized spells.\n\n|cFFFFFF00-|r Added dwarf racial Stone Form on cooldown list |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Bookmark now are shared between all characters.\n\n|cFFFFFF00-|r Fixed few inconsistencies with trash recognition.\n\n|cFFFFFF00-|r Fixed Cloud Capture where sometimes it wasn't sharing.\n\n|cFFFFFF00-|r Fixed report where it wasn't sharing for guild and raid when the player name box were empty.\n\n|cFFFFFF00-|r Report box now also saves the position and the last channel used to report |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r You Are Not Prepared plugin now have tooltips for spells and its window auto opens after a boss encounter.\n\n|cFFFFFF00-|r Advanced Death Logs plugin got full rewrite (and still are in development).\n\n|cFFFFFF00v1.19.0 - v1.19.1 - v1.19.2 (|cFFFFCC00Jul 21, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Details! is now able to be translated by its community for all supported languages through Curse Forge Web Site:\n\n|cFFFFFF00http://wow.curseforge.com/addons/details/localization/|r\n\n|cFFFFFF00-|r Slash commands now are multi language, accepting both english and the localized language.\n\n|cFFFFFF00-|r Added Data Broker for: Combat Time, Player Dps and Player Hps.\n\n|cFFFFFF00-|r Rework on plugins: Timeline, You Are Not Prepared, Tiny Threat, Encounter Details. All those plugins got a options panel and few improvaments.\n\n|cFFFFFF00-|r Trash segments won't be saved anymore.\n\n|cFFFFFF00-|r Added support for plugins options.\n\n|cFFFFFF00-|r Revamp on Deaths report lines, adding links for harmful spells and changing the text order |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Modified the percentage used on Comparison panel |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed the Raid Dps and Hps data exported by Data Broker |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00v1.18.4 - v1.18.5 - v1.18.6 (|cFFFFCC00Jul 13, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added option to customize the bar left text.\n\n|cFFFFFF00-|r Added option for show or hide bar placement number.\n\n|cFFFFFF00-|r Spell icon is shown in the bar when the enemy character is a environment spell type.\n\n|cFFFFFF00-|r Changed the non-player enemy icon (monsters).\n\n|cFFFFFF00-|r Fixed bug on flex performance profile |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Added new version tracker which should alert you when a newer Details! version is found.\n\n|cFFFFFF00-|r Added Enemy Damage Taken by clicking with middle mouse button over a enemy bar (enemies display).\n\n|cFFFFFF00-|r Added import/export for saved skins and custom displays created.\n\n|cFFFFFF00-|r Small changes on ElvUI Frame Style skin (need reaply).\n\n|cFFFFFF00-|r Fixed the death recognition for bosses, now it should show the correct color over segments menu.\n\n|cFFFFFF00-|r Fixed Dps inacuracy when plyaing solo (no party or raid group).\n\n|cFFFFFF00-|r Fixed the duration time of buffs applied before the pull, like pre-potions.\n\n|cFFFFFF00v1.17.5 (|cFFFFCC00Jun 30, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Shortcut panel is now known as Bookmarks and a revamp has done on its panel.\n\n|cFFFFFF00-|r NickTag now doesnt check anymore if a received nickname from other guild member is invalid.\n\n|cFFFFFF00-|r Healthstone now is considered a cooldown.\n\n|cFFFFFF00-|r Few improvements on Default Skin, Minimalistic Skin and ElvUI Frame Style Skin.\n\n|cFFFFFF00-|r Revamp on Image Editor, many bugs solves and now it is usable.\n\n|cFFFFFF00-|r 'Hide' slash command now hides all opened windows; 'Show', open all closed windows and 'New' create a new window.\n\n|cFFFFFF00-|r Added Devotion Aura, Rallying Cry as cooldowns.\n\n|cFFFFFF00-|r Added options for lock, unlock, break snap, close, reopen and create new window.\n\n|cFFFFFF00-|r Added a options panel for HotCorners, access it through options button or slash hotcorner command.\n\n|cFFFFFF00-|r Added 'Logos' and 'Raid & Dungeons' sections for Wallpapers. \n\n|cFFFFFF00-|r Added a option to load a image from the computer to use as wallpaper.\n\n|cFFFFFF00-|r Fixed the percent issue with Healing Done and HPS while in combat.\n\n|cFFFFFF00-|r Fixed non-combat switch by role where changing role wasnt changing the shown attribute.\n\n|cFFFFFF00-|r Fixed 'While in Combat' hiding schema |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed several bugs on Interact Auto Transparency.\n\n|cFFFFFF00-|r Fixed the report window alert when opening the report window and it already is opened |cFF999999(thanks @Rasstapp-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed the gap between last row created and the end of the window.\n\n|cFFFFFF00-|r Fixed all tooltips bugs on Wallpaper Section on Options Panel.\n\n|cFFFFFF00a1.17.0 (|cFFFFCC00Jun 21, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Support for Custom Displays has been rewrited, to access the new panel go to Sword Menu -> Custom -> Create New Display.\n\n|cFFFFFF00-|r Added a custom display for show potion usage.\n\n|cFFFFFF00-|r Fixed a bug where the player pet wasnt being tracked after logon in the game. This bug was affecting directly classes with pets playing out of a raid group.\n\n|cFFFFFF00-|r Fixed the report bug on healing, energy and misc attributes |cFF999999(thanks @skmzarn-mmochampion forum)|r." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " --> startup diff --git a/classes/classe_combate.lua b/classes/classe_combate.lua index 9c96407d..2be2c0ee 100644 --- a/classes/classe_combate.lua +++ b/classes/classe_combate.lua @@ -227,6 +227,7 @@ --> avoid using this values bellow, they aren't updated by the parser, only on demand by a user interaction. voidzone_damage = 0, + frags_total = 0, --> end } diff --git a/classes/classe_damage.lua b/classes/classe_damage.lua index 7383902d..b0b16e33 100644 --- a/classes/classe_damage.lua +++ b/classes/classe_damage.lua @@ -459,8 +459,17 @@ tabela._custom = true end + local total = instancia.showing.totals.frags_total + local porcentagem + + if (instancia.row_info.percent_type == 1) then + porcentagem = _cstr ("%.1f", tabela [2] / total * 100) + elseif (instancia.row_info.percent_type == 2) then + porcentagem = _cstr ("%.1f", tabela [2] / instancia.top * 100) + end + esta_barra.texto_esquerdo:SetText (colocacao .. ". " .. tabela [1]) - esta_barra.texto_direita:SetText (tabela [2]) + esta_barra.texto_direita:SetText (tabela [2] .. " (" .. porcentagem .. "%)") esta_barra.texto_esquerdo:SetSize (esta_barra:GetWidth() - esta_barra.texto_direita:GetStringWidth() - 20, 15) @@ -478,8 +487,16 @@ esta_barra.textura:SetVertexColor (_unpack (_detalhes.class_colors [tabela [3]])) if (tabela [3] == "UNKNOW" or tabela [3] == "UNGROUPPLAYER" or tabela [3] == "ENEMY") then - esta_barra.icone_classe:SetTexture ("Interface\\LFGFRAME\\LFGROLE_BW") - esta_barra.icone_classe:SetTexCoord (.25, .5, 0, 1) + --esta_barra.icone_classe:SetTexture ("Interface\\LFGFRAME\\LFGROLE_BW") + --esta_barra.icone_classe:SetTexCoord (.25, .5, 0, 1) + --esta_barra.icone_classe:SetVertexColor (1, 1, 1) + + --esta_barra.icone_classe:SetTexture ([[Interface\MINIMAP\Minimap_skull_normal]]) + --esta_barra.icone_classe:SetTexCoord (0, 1, 0, 1) + --esta_barra.icone_classe:SetVertexColor (1, 1, 1) + + esta_barra.icone_classe:SetTexture ([[Interface\AddOns\Details\images\classes_plus]]) + esta_barra.icone_classe:SetTexCoord (0.50390625, 0.62890625, 0, 0.125) esta_barra.icone_classe:SetVertexColor (1, 1, 1) else esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file) @@ -611,6 +628,7 @@ esta_barra.colocacao = colocacao local total = instancia.showing.totals.voidzone_damage + local combat_time = instancia.showing:GetCombatTime() local dps = _math_floor (self.damage / combat_time) @@ -731,6 +749,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex if (keyName == "frags") then local frags = instancia.showing.frags + local frags_total_kills = 0 local index = 0 for fragName, fragAmount in _pairs (frags) do @@ -758,6 +777,8 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex ntable [index] = {fragName, fragAmount, actor_classe} end + frags_total_kills = frags_total_kills + fragAmount + end local tsize = #ntable @@ -767,10 +788,8 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex end end + instancia.top = 0 if (tsize > 0) then - --_table_sort (ntable, function (t1, t2) - -- return (t1 [2] > t2 [2]) - --end) _table_sort (ntable, _detalhes.Sort2) instancia.top = ntable [1][2] end @@ -790,10 +809,10 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex return _detalhes:EndRefresh (instancia, total, tabela_do_combate, showing) --> retorna a tabela que precisa ganhar o refresh end - --estra mostrando ALL então posso seguir o padrão correto? primeiro, atualiza a scroll bar... + tabela_do_combate.totals.frags_total = frags_total_kills + instancia:AtualizarScrollBar (total) - --depois faz a atualização normal dele através dos iterators local qual_barra = 1 local barras_container = instancia.barras @@ -897,10 +916,8 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex tabela_do_combate.totals.voidzone_damage = voidzone_damage_total - --esta mostrando ALL então posso seguir o padrão correto? primeiro, atualiza a scroll bar... instancia:AtualizarScrollBar (total) - --depois faz a atualização normal dele através dos iterators local qual_barra = 1 local barras_container = instancia.barras @@ -1325,12 +1342,15 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra, elseif (sub_atributo == 3) then --> mostrando damage taken + local dtps = self.damage_taken / combat_time + local formated_damage_taken = SelectedToKFunction (_, self.damage_taken) + local formated_dtps = SelectedToKFunction (_, dtps) if (UsingCustomRightText) then - esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_damage_taken, "", porcentagem, self)) + esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_damage_taken, formated_dtps, porcentagem, self)) else - esta_barra.texto_direita:SetText (formated_damage_taken .." (" .. porcentagem .. "%)") --seta o texto da direita -- + esta_barra.texto_direita:SetText (formated_damage_taken .." (" .. formated_dtps .. ", " .. porcentagem .. "%)") --seta o texto da direita -- end esta_porcentagem = _math_floor ((self.damage_taken/instancia.top) * 100) --> determina qual o tamanho da barra @@ -2408,6 +2428,8 @@ function atributo_damage:MontaInfoDamageDone() return true end + gump:JI_AtualizaContainerAlvos (amt) + --_table_sort (meus_agressores, function (a, b) return a[2] > b[2] end) _table_sort (meus_agressores, _detalhes.Sort2) diff --git a/functions/profiles.lua b/functions/profiles.lua index e60a045f..114eb61a 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -338,6 +338,9 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy) --> open the instance if (instance:IsEnabled()) then + if (not instance.baseframe) then + instance:AtivarInstancia() + end instance:LockInstance (instance.isLocked) instance:RestoreMainWindowPosition() instance:ReajustaGump() diff --git a/gumps/janela_welcome.lua b/gumps/janela_welcome.lua index 7d5229cc..a71ad02d 100644 --- a/gumps/janela_welcome.lua +++ b/gumps/janela_welcome.lua @@ -189,121 +189,7 @@ function _detalhes:OpenWelcomeWindow () end _detalhes.standard_skin = savedObject end - - do - local Loc = LibStub ("AceLocale-3.0"):NewLocale ("Details", "enUS", true) - if (Loc) then - - Loc ["STRING_WELCOME_1"] = "|cFFFFFFFFWelcome to Details! Quick Setup Wizard\n\n|rThis guide will help you with some important configurations.\nYou can skip this at any time just clicking on 'skip' button." - Loc ["STRING_WELCOME_2"] = "if you change your mind, you can always modify again through options panel" - Loc ["STRING_WELCOME_3"] = "Choose your DPS and HPS prefered method:" - Loc ["STRING_WELCOME_4"] = "Activity Time"..": " - Loc ["STRING_WELCOME_5"] = "Effective Time"..": " - Loc ["STRING_WELCOME_6"] = "the timer of each raid member is put on hold if his activity is ceased and back again to count when is resumed." - Loc ["STRING_WELCOME_7"] = "used for rankings, this method uses the elapsed combat time for measure the Dps and Hps of all raid members." - Loc ["STRING_WELCOME_8"] = "if you change your mind, you can always modify again through options panel" - Loc ["STRING_WELCOME_9"] = "Details! reads and calculate combat numbers in a very fast way, but if some kind of data is irrelevant for you, you can disable/enable it 'on-the-fly'." - Loc ["STRING_WELCOME_10"] = "Mouse over each slider to see what they represent." - Loc ["STRING_WELCOME_11"] = "if you change your mind, you can always modify again through options panel" - Loc ["STRING_WELCOME_12"] = "In this page you can choose the update speed desired and also enable animations." - Loc ["STRING_WELCOME_13"] = "" - Loc ["STRING_WELCOME_14"] = "Update Speed" - Loc ["STRING_WELCOME_15"] = "This is the delay length between each update in the window,\nthe standard value is 1 second,\nbut you may decrease to 0.3 for more dynamic updates." - Loc ["STRING_WELCOME_16"] = "Enable Animations" - Loc ["STRING_WELCOME_17"] = "Enable or Disable bar animations." - Loc ["STRING_WELCOME_18"] = "if you change your mind, you can always modify again through options panel" - Loc ["STRING_WELCOME_19"] = "Memory Adjustments:" - Loc ["STRING_WELCOME_20"] = "The amount of memory used by addons doesn't affect framerate, but, saving memory in computers which doesn't have much of it, may help the whole system. Details! try to be as flexible as possible to keep the game smooth even in not high-end hardware." - Loc ["STRING_WELCOME_21"] = "max segments" - Loc ["STRING_WELCOME_22"] = "How many segments you want to maintain.\nFeel free to adjust this number to be comfortable for you." - Loc ["STRING_WELCOME_23"] = "memory threshold" - Loc ["STRING_WELCOME_24"] = "Details! try adjust it self with the amount of memory\navaliable on your system.\n\nAlso is recommeded keep the amount of\nsegments low if your system have 2gb ram or less." - Loc ["STRING_WELCOME_25"] = "segments saved on logout" - Loc ["STRING_WELCOME_26"] = "Using the Interface: Stretch" - Loc ["STRING_WELCOME_27"] = "- When you have the mouse over a Details! window, a |cFFFFFF00small hook|r will appear over the instance button. |cFFFFFF00Click, hold and pull|r up to |cFFFFFF00stretch|r the window, releasing the mouse click, the window |cFFFFFF00back to original|r size.\n\n- If you miss a |cFFFFBB00scroll bar|r, you can active it on the options panel." - Loc ["STRING_WELCOME_28"] = "Using the Interface: Instance Button" - Loc ["STRING_WELCOME_29"] = "Instance button basically do three things:\n\n- show |cFFFFFF00what instance|r is it through the |cFFFFFF00#number|r,\n- open a |cFFFFFF00new instance|r window when clicked.\n- show a menu with |cFFFFFF00closed instances|r which can be reopen at any one." - Loc ["STRING_WELCOME_30"] = "Using the Interface: Fast Switch Panel (shortcuts)" - Loc ["STRING_WELCOME_31"] = "- Right clicking |cFFFFFF00over a row|r or in the background opens the |cFFFFFF00shortcut menu|r.\n- You can choose which |cFFFFFF00attribute|r the shortcut will have by |cFFFFFF00right clicking|r his icon.\n- Left click |cFFFFFF00selects|r the shortcut attribute and |cFFFFFF00display|r it on the instance\n- Right click anywhere |cFFFFFF00closes|r the switch panel." - Loc ["STRING_WELCOME_32"] = "Using the Interface: Snap Instances" - Loc ["STRING_WELCOME_33"] = "You can |cFFFFFF00snap windows|r in vertical or horizontal. A window always snap with |cFFFFFF00previous instance number|r: like the image in the right, instance |cFFFFFF00#5|r snapped with |cFFFFFF00#4|r. When a snapped window is stretched, all other instances in the |cFFFFFF00cluster are also|r stretched." - Loc ["STRING_WELCOME_34"] = "Using the Interface: Micro Display" - Loc ["STRING_WELCOME_35"] = "All instances have three |cFFFFFF00mini widgets|r located at the bottom of window. |cFFFFFF00Right clicking|r pops up a menu and with |cFFFFFF00left click|r displays a options panel for that widget." - Loc ["STRING_WELCOME_36"] = "Using the Interface: Plugins" - Loc ["STRING_WELCOME_37"] = "|cFFFFFF00Threat, tank avoidance, and others|r are handled by |cFFFFFF00plugins|r. You can open a new instance, select '|cFFFFFF00Widgets|r' and choose what you want at |cFFFFFF00sword|r menu.\n\nTip: click over a bar on |cFFFFFF00Vanguard|r to show avoidance numbers." - Loc ["STRING_WELCOME_38"] = "Ready to Raid!" - Loc ["STRING_WELCOME_39"] = "Thank you for choosing Details!\n\nFeel free to always send feedbacks and bug reports to us (|cFFBBFFFFuse the fifth button a blue one|r), we appreciate." - - Loc ["STRING_WELCOME_40"] = "Which parts of a fight is important to you?" - Loc ["STRING_WELCOME_41"] = "Some Cool Interface Tweaks:" - - Loc ["STRING_WELCOME_42"] = "Quick Appearance Settings" - Loc ["STRING_WELCOME_43"] = "Choose your prefered skin:" - Loc ["STRING_WELCOME_44"] = "Wallpaper" - Loc ["STRING_WELCOME_45"] = "For more customization options, check the options panel." - - end - end - - do - local Loc = LibStub ("AceLocale-3.0"):NewLocale ("Details", "ptBR") - if (Loc) then - - Loc ["STRING_WELCOME_1"] = "|cFFFFFFFFBem vindo ao Details! Setup Rapido\n\n|rEste guia ira ajuda-la a configurar rapidamente aspectos basicos desde addon.\nVoce pode pular este guia a qualquer momento clicando no botao de cancelar." - Loc ["STRING_WELCOME_2"] = "se voce mudar de ideia, voce pode mudar novamente no painel de opcoes" - Loc ["STRING_WELCOME_3"] = "Escolha o metodo de DPS e HPS preferido:" - Loc ["STRING_WELCOME_4"] = "Atividade"..": " - Loc ["STRING_WELCOME_5"] = "Efetividade"..": " - Loc ["STRING_WELCOME_6"] = "o tempo do jogador e posto em pausa quando sua atividade e interrompida voltando a contar seu tempo quando voltar a atividade, metodo mais comum." - Loc ["STRING_WELCOME_7"] = "usado em rankings, este metodo usa o tempo total da luta para medir o Dps e Hps de todos os membros da raide." - Loc ["STRING_WELCOME_8"] = "se voce mudar de ideia, voce pode mudar novamente no painel de opcoes" - Loc ["STRING_WELCOME_9"] = "Details! faz a leitura e calculos do combate de uma maneira rapida, mas se algo e irrelevante para voce, e possivel desativa-lo." - Loc ["STRING_WELCOME_10"] = "Passe o mouse para saber o que cada um representa" - Loc ["STRING_WELCOME_11"] = "se voce mudar de ideia, voce pode mudar novamente no painel de opcoes" - Loc ["STRING_WELCOME_12"] = "Aqui voce pode escolher o tempo de intervalo entre cada atualizacao da janela." - Loc ["STRING_WELCOME_13"] = "" - - Loc ["STRING_WELCOME_14"] = "Update Speed" - Loc ["STRING_WELCOME_14"] = "Intervalo de Atualizacao" - Loc ["STRING_WELCOME_15"] = "tempo entre cada atualizacao,\nuso da cpu pode |cFFFF9900aumentar levemente|r com valores muito baixos\ne |cFF00FF00ter reducao|r com valores mais altos." - Loc ["STRING_WELCOME_16"] = "Animar Barras" - Loc ["STRING_WELCOME_17"] = "ativa ou desativa as animacoes das barras.\nuso da cpu pode |cFFFF9900aumentar levemente|r com esta opcao ligada." - Loc ["STRING_WELCOME_18"] = "se voce mudar de ideia, voce pode mudar novamente no painel de opcoes" - Loc ["STRING_WELCOME_19"] = "Ajustes da Memoria:" - Loc ["STRING_WELCOME_20"] = "A quantidade de memoria nos addons nao afeta a taxa de quadros por segundo, mas, diminuir seu uso em computadores com pouca memoria, pode ajudar o desempenho em todo o sistema." - Loc ["STRING_WELCOME_21"] = "total de segmentos" - Loc ["STRING_WELCOME_22"] = "Quantos segmentos voce deseja armazenar." - Loc ["STRING_WELCOME_23"] = "limites de memoria" - - Loc ["STRING_WELCOME_24"] = "Details! tenta auto ajustar a memoria usada de acordo com a memoria disponivel no sistema.\n\nTambem e recomendado limitar a quantidade de segmentos com 2Gb ou menor de memoria ram." - Loc ["STRING_WELCOME_25"] = "segmentos salvos no logout" - Loc ["STRING_WELCOME_26"] = "Usando a Interface: Stretch" - Loc ["STRING_WELCOME_27"] = "- Quando o mouse esta sobre a janela, um |cFFFFFF00gancho|r aparecera no canto direito superior da janela. |cFFFFFF00Clique, segure e arraste|r para cima |cFFFFFF00para esticar|r a janela, soltando o clique o mouse |cFFFFFF00a janela volta ao tamanho original|r.\n\n- Se voce sente falta da |cFFFFBB00barra de rolagem|r, voce pode ativa-la no painel de opcoes." - Loc ["STRING_WELCOME_28"] = "Usando a Interface: Botao de Instancias (janelas)" - Loc ["STRING_WELCOME_29"] = "Botao de Instancias (janelas) e usado para:\n\n- mostrar |cFFFFFF00qual instancia|r ele eh, atraves do |cFFFFFF00#numero|r,\n- abrir uma |cFFFFFF00nova instancia do Details!|r quando clicado.\n- mostrado um menu das |cFFFFFF00janelas que estao fechadas|r para reabri-las." - Loc ["STRING_WELCOME_30"] = "Usando a Interface: Atalhos" - Loc ["STRING_WELCOME_31"] = "- Clicando com o Direito |cFFFFFF00em uma barra ou na janela|r abre |cFFFFFF00o menu de atalhos|r.\n- Voce pode escolher o |cFFFFFF00atributo|r que o atalho tera |cFFFFFF00clicando com o botao direito|r no seu icone.\n- Botao esquerdo |cFFFFFF00troca para aquele atributo|r \n- Botao direito fecha o painel de atalhos." - Loc ["STRING_WELCOME_32"] = "Usando a Interface: Juntar Instancias" - Loc ["STRING_WELCOME_33"] = "Voce pode |cFFFFFF00juntar as janelas|r na vertical ou horizontal. Uma janela grudara com a |cFFFFFF00janela anterior a ela|r: como na imagem a direita, a instancia |cFFFFFF00#5|r grudou na |cFFFFFF00#4|r. Quando grudadas, as janelas redimencionam, esticam e movem-se juntas." - Loc ["STRING_WELCOME_34"] = "Usando a Interface: Mini Displays" - Loc ["STRING_WELCOME_35"] = "Todas as janelas possuem 3 |cFFFFFF00mini displays|r localizados na parte inferior da janela. |cFFFFFF00Botao Direiro |r abrira um menu para escolher o que deseja mostrar |cFFFFFF00botao esquerdo|r abre as configuracoes." - Loc ["STRING_WELCOME_36"] = "Usando a Interface: Plugins" - Loc ["STRING_WELCOME_37"] = "|cFFFFFF00Ameaca, avoidance do tank, o muito mais|r podem ser vistos atraves de |cFFFFFF00plugins|r. Voce pode abrir uma nova janela e selecionar '|cFFFFFF00Widgets|r' e escolher o plugin no |cFFFFFF00menu da espada|r." - Loc ["STRING_WELCOME_38"] = "Pronto Para Jogar!" - Loc ["STRING_WELCOME_39"] = "Obrigado por escolher o Details!\n\nSinta-se a vontade para nos enviar feedbacks do que achou deste addon (|cFFBBFFFFno quinto botao, um azul|r)." - - Loc ["STRING_WELCOME_40"] = "Quais dados sao importantes para voce?" - Loc ["STRING_WELCOME_41"] = "Alguns ajustes bacanas na interface:" - - Loc ["STRING_WELCOME_42"] = "Ajustes na Aparencia" - Loc ["STRING_WELCOME_43"] = "Escolha sua Skin preferida:" - Loc ["STRING_WELCOME_44"] = "Papel de Parede" - Loc ["STRING_WELCOME_45"] = "Para mais ajustes na aparencia, veja o painel de opcoes." - - end - end - -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> page 1 diff --git a/startup.lua b/startup.lua index 99b37045..88e1b1e8 100644 --- a/startup.lua +++ b/startup.lua @@ -278,15 +278,13 @@ function _G._detalhes:Start() --> check is this is the first run if (self.is_first_run) then - _detalhes:OpenWelcomeWindow() - if (#self.custom == 0) then _detalhes:AddDefaultCustomDisplays() end _detalhes:FillUserCustomSpells() end - + --> start tutorial if this is first run if (self.tutorial.logons < 2 and self.is_first_run) then self:StartTutorial() @@ -414,7 +412,7 @@ function _G._detalhes:Start() --_detalhes:OpenOptionsWindow (_detalhes.tabela_instancias[1]) --print (_G ["DetailsClearSegmentsButton1"]:GetSize()) --_detalhes:OpenCustomDisplayWindow() - --_detalhes:OpenWelcomeWindow() --for debug + --_detalhes:OpenWelcomeWindow() end _detalhes:ScheduleTimer ("OpenOptionsWindowAtStart", 2) --_detalhes:OpenCustomDisplayWindow() @@ -427,5 +425,9 @@ function _G._detalhes:Start() _detalhes:OpenProfiler() + if (self.is_first_run) then + _detalhes:OpenWelcomeWindow() + end + end