From b12688cae275335afd7c655a5f7a09dd69a060f3 Mon Sep 17 00:00:00 2001 From: Tercio Date: Tue, 7 Feb 2017 13:20:55 -0200 Subject: [PATCH] - Added custom display 'Dynamic Overall Damage' for mythic dungeons. - Fix for Ticket #168: 'Auto Hide While [Not] Inside Instance is broken'. - The bar truncate frame 'DetailsLeftTextAntiTruncate' is now created on Details! load instead on demand. --- boot.lua | 13 ++-- classes/classe_custom.lua | 120 +++++++++++++++++++++++++++++++++++++ core/parser.lua | 6 ++ gumps/janela_principal.lua | 30 ++++++---- 4 files changed, 151 insertions(+), 18 deletions(-) diff --git a/boot.lua b/boot.lua index 61466964..e0f1a902 100644 --- a/boot.lua +++ b/boot.lua @@ -3,7 +3,7 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.build_counter = 3325 + _detalhes.build_counter = 3370 _detalhes.userversion = "v7.1.5." .. _detalhes.build_counter _detalhes.realversion = 116 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" @@ -21,16 +21,17 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ -|cFFFFFF00v7.1.5.3325.116 (|cFFFFCC00Jan 30th, 2016|r|cFFFFFF00)|r:\n\n -|cFFFFFF00-|r Ticket #166: add 'toggle spark option on Streamer plugin'.\n\n -|cFFFFFF00-|r Fixed a random error '1263' which some users were getting.\n\n +|cFFFFFF00v7.1.5.3369.116 (|cFFFFCC00Feb 07th, 2016|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r Added custom display 'Dynamic Overall Damage' for mythic dungeons.\n\n +|cFFFFFF00-|r Fix for Ticket #168: 'Auto Hide While [Not] Inside Instance is broken'.\n\n +|cFFFFFF00-|r The bar truncate frame 'DetailsLeftTextAntiTruncate' is now created on Details! load instead on demand.\n\n + --]] -- - - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v7.1.5.3315.116 (|cFFFFCC00Jan 23th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Ticket #162: 'no Monochrome font' available, added an experimental slash command: /run _detalhes:UseOutline ('MONOCHROME').\n\n|cFFFFFF00-|r Ticket #158: 'no elapsed time shown on report to chat', added the elapsed time when reporting a segment.\n\n|cFFFFFF00-|r Ticket #164: 'error when browsing segments', an attempt to fix the problem has been made.\n\n|cFFFFFF00v7.1.5.3305.116 (|cFFFFCC00Jan 15th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Another fix for mythic dungeons overall data reset (thanks Tharai @ Curseforge).\n\n|cFFFFFF00-|r Fix for spec detection on PvP Arenas (thanks Pas06 @ Curseforge).\n\n|cFFFFFF00v7.1.0.3276.115 (|cFFFFCC00Jan 08th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed the overall data not reseting when starting a new mythic+ dungeon.\n\n|cFFFFFF00v7.1.0.3266.115 (|cFFFFCC00Dec 29th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with overall data not updating correctly at the end of the combat.\n\n|cFFFFFF00-|r Added a tutorial line on the window when the user access overall data.\n\n|cFFFFFF00v7.1.0.3236.115 (|cFFFFCC00Dec 19th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Integration with BigWigs should be working okay now.\n\n|cFFFFFF00v7.1.0.3231.115 (|cFFFFCC00Dec 15th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Disabled the link with BigWigs to avoid the 'RegisterMessage' error on every login.\n\n|cFFFFFF00v7.1.0.3229.115 (|cFFFFCC00Dec 09th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r When a window is locked, resize grips shouldn't be enabled messing with bar mouse over.\n\n|cFFFFFF00v7.0.3.3222.115 (|cFFFFCC00November 28th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Unstable Affliction to common spells with the same name.\n\n|cFFFFFF00-|r Fixed few issues with built-in plugins.\n\n|cFFFFFF00v7.0.3.3202.115 (|cFFFFCC00November 08th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Weakauras creator from the Encounter Details plugin and '/details forge' shall work correctly now with Trials of Valor.\n\n|cFFFFFF00-|r Raid history should now be recording your Trials of Valor kills.\n\n|cFFFFFF00-|r Added Trials of Valor raid info, good luck and have fun!.\n\n|cFFFFFF00v7.0.3.3201.115 (|cFFFFCC00November 04th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for Paladin holy icon.\n\n|cFFFFFF00-|r Fix for Rogue outlaw icon.\n\n|cFFFFFF00-|r Fixed misc displays with bar sorted by ascending order.\n\n|cFFFFFF00-|r Fix for '/details show' command while the window is on auto hide.\n\n|cFFFFFF00v7.0.3.3114.115 (|cFFFFCC00October 26th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): tooltip tutorial is now clamped to screen and its close button should be visible.\n\n|cFFFFFF00-|r Raid Check (plugin): now also works on dungeons.\n\n|cFFFFFF00-|r Added Potion of the Prolongued Power to the tracker.\n\n|cFFFFFF00v7.1.0.3097.115 (|cFFFFCC00October 25th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r renamed 'report history' to 'latest reports'.\n\n|cFFFFFF00-|r attempt to make all Details! users on the party or raid to track rogue's akaari's soul.\n\n|cFFFFFF00v7.0.3.2994 (|cFFFFCC00September 25th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r |cFF0088EE[Devilsaur Shock-Baton]|r added to custom spells, its effect should be displayed: 'Devilsaur Shock Leash (trinket)'.\n\n|cFFFFFF00-|r More fixes for dungeon trash being tag as a dungeon boss.\n\n|cFFFFFF00-|r Fixed the item level calculation when the player is using a main hand and offhand artifact.\n\n|cFFFFFF00-|r Added option to auto erase world segments (outdoors, e.g. doing world quests).\n\n|cFFFFFF00-|r Fixed the avoidance tab on the player detail window for Demon Hunters.\n\n|cFFFFFF00-|r Added the tag {target} on custom text for the interrupt announcer.\n\n|cFFFFFF00-|r Merging Demon Hunter 'Fury of the Illidari' spell when the consolidade option is enabled under Spell Customization.\n\n|cFFFFFF00v7.0.3.2961 (|cFFFFCC00September 17th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option for consolidade spells with the same name (isn't working with all spells yet).\nThe option is under Spell Customization on options panel.\n\n|cFFFFFF00v7.0.3.2955 (|cFFFFCC00September 14th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Built-in custom displays has been updated to Legion.\n\n|cFFFFFF00-|r Raid Check (plugin) now checks for Legion food, rune and flash.\n\n|cFFFFFF00-|r removed the config button from the Player Details Window.\n\n|cFFFFFF00-|r the alert for this news window won't popup for each characters after the player opened it once for the update.\n\n|cFFFFFF00-|r added tooltip information for the two new arenas added in Legion.\n\n|cFFFFFF00v7.0.3.2941 (|cFFFFCC00September 13th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r fix for total bar where sometimes it desappears.\n\n|cFFFFFF00-|r fix for overall data reseting its elapsed time making dps and hps goes to millions.\n\n|cFFFFFF00-|r fix for overall not reseting when entering in a new dungeon.\n\n|cFFFFFF00-|r fix for trash cleanup on dungeons.\n\n|cFFFFFF00-|r fix for item level detection on dungeons.\n\n|cFFFFFF00-|r fix for artifact offhand always being counter as 750 item level.\n\n|cFFFFFF00-|r fix for segments menu sometimes not opening at all after a dungeon boss.\n\n|cFFFFFF00-|r fix for segments menu not showing the boss icon above the sub panel.\n\n|cFFFFFF00-|r fix for the top left corner of the window be ignoring the 'hide icon' setting at a /reload.\n\n|cFFFFFF00v7.0.3.2927 (|cFFFFCC00September 3rd, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Attempt to fix an issue with total bar hidding the latest bar shown.\n\n|cFFFFFF00v7.0.3.2899 (|cFFFFCC00August 26, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed a bug on tiny threat where it won't used the font set after a /reload.\n\n|cFFFFFF00-|r Bar spacing can now be set to -2 to 10 (from 0 to 10).\n\n|cFFFFFF00-|r Attempt to fix GBoM and Stormlash on dungeon boss fights.\n\n|cFFFFFF00v5.21 (|cFFFFCC00August 14, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for Monk's Soothing Mist on Streamer Plugin.\n\n|cFFFFFF00v5.20 (|cFFFFCC00August 13, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Warlock's Grimoire of Synergy buff uptime fix.\n\n|cFFFFFF00-|r Fix for the options panel background when using Classic panels.\n\n|cFFFFFF00-|r Tooltips are now slightly bigger.\n\n|cFFFFFF00-|r Fix for bookmark background where sometimes it has a light silver color.\n\n|cFFFFFF00-|r Fix for channel cast on Streamer Plugin.\n\n|cFFFFFF00-|r Legion followers fix.\n\n|cFFFFFF00-|r Boss detection for Legion dungeons.\n\n|cFFFFFF00-|r Priest spec detection review (thanks Yakumile-Azralon).\n\n|cFFFFFF00v5.15 (|cFFFFCC00August 5, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r fix for an error which happen sometimes during encounter start." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v7.1.5.3369.116 (|cFFFFCC00Feb 07th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added custom display 'Dynamic Overall Damage' for mythic dungeons.\n\n|cFFFFFF00-|r Fix for Ticket #168: 'Auto Hide While [Not] Inside Instance is broken'.\n\n|cFFFFFF00-|r The bar truncate frame 'DetailsLeftTextAntiTruncate' is now created on Details! load instead on demand.\n\n|cFFFFFF00v7.1.5.3315.116 (|cFFFFCC00Jan 23th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Ticket #162: 'no Monochrome font' available, added an experimental slash command: /run _detalhes:UseOutline ('MONOCHROME').\n\n|cFFFFFF00-|r Ticket #158: 'no elapsed time shown on report to chat', added the elapsed time when reporting a segment.\n\n|cFFFFFF00-|r Ticket #164: 'error when browsing segments', an attempt to fix the problem has been made.\n\n|cFFFFFF00v7.1.5.3305.116 (|cFFFFCC00Jan 15th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Another fix for mythic dungeons overall data reset (thanks Tharai @ Curseforge).\n\n|cFFFFFF00-|r Fix for spec detection on PvP Arenas (thanks Pas06 @ Curseforge).\n\n|cFFFFFF00v7.1.0.3276.115 (|cFFFFCC00Jan 08th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed the overall data not reseting when starting a new mythic+ dungeon.\n\n|cFFFFFF00v7.1.0.3266.115 (|cFFFFCC00Dec 29th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with overall data not updating correctly at the end of the combat.\n\n|cFFFFFF00-|r Added a tutorial line on the window when the user access overall data.\n\n|cFFFFFF00v7.1.0.3236.115 (|cFFFFCC00Dec 19th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Integration with BigWigs should be working okay now.\n\n|cFFFFFF00v7.1.0.3231.115 (|cFFFFCC00Dec 15th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Disabled the link with BigWigs to avoid the 'RegisterMessage' error on every login.\n\n|cFFFFFF00v7.1.0.3229.115 (|cFFFFCC00Dec 09th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r When a window is locked, resize grips shouldn't be enabled messing with bar mouse over.\n\n|cFFFFFF00v7.0.3.3222.115 (|cFFFFCC00November 28th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Unstable Affliction to common spells with the same name.\n\n|cFFFFFF00-|r Fixed few issues with built-in plugins.\n\n|cFFFFFF00v7.0.3.3202.115 (|cFFFFCC00November 08th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Weakauras creator from the Encounter Details plugin and '/details forge' shall work correctly now with Trials of Valor.\n\n|cFFFFFF00-|r Raid history should now be recording your Trials of Valor kills.\n\n|cFFFFFF00-|r Added Trials of Valor raid info, good luck and have fun!.\n\n|cFFFFFF00v7.0.3.3201.115 (|cFFFFCC00November 04th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for Paladin holy icon.\n\n|cFFFFFF00-|r Fix for Rogue outlaw icon.\n\n|cFFFFFF00-|r Fixed misc displays with bar sorted by ascending order.\n\n|cFFFFFF00-|r Fix for '/details show' command while the window is on auto hide.\n\n|cFFFFFF00v7.0.3.3114.115 (|cFFFFCC00October 26th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): tooltip tutorial is now clamped to screen and its close button should be visible.\n\n|cFFFFFF00-|r Raid Check (plugin): now also works on dungeons.\n\n|cFFFFFF00-|r Added Potion of the Prolongued Power to the tracker.\n\n|cFFFFFF00v7.1.0.3097.115 (|cFFFFCC00October 25th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r renamed 'report history' to 'latest reports'.\n\n|cFFFFFF00-|r attempt to make all Details! users on the party or raid to track rogue's akaari's soul.\n\n|cFFFFFF00v7.0.3.2994 (|cFFFFCC00September 25th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r |cFF0088EE[Devilsaur Shock-Baton]|r added to custom spells, its effect should be displayed: 'Devilsaur Shock Leash (trinket)'.\n\n|cFFFFFF00-|r More fixes for dungeon trash being tag as a dungeon boss.\n\n|cFFFFFF00-|r Fixed the item level calculation when the player is using a main hand and offhand artifact.\n\n|cFFFFFF00-|r Added option to auto erase world segments (outdoors, e.g. doing world quests).\n\n|cFFFFFF00-|r Fixed the avoidance tab on the player detail window for Demon Hunters.\n\n|cFFFFFF00-|r Added the tag {target} on custom text for the interrupt announcer.\n\n|cFFFFFF00-|r Merging Demon Hunter 'Fury of the Illidari' spell when the consolidade option is enabled under Spell Customization.\n\n|cFFFFFF00v7.0.3.2961 (|cFFFFCC00September 17th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option for consolidade spells with the same name (isn't working with all spells yet).\nThe option is under Spell Customization on options panel.\n\n|cFFFFFF00v7.0.3.2955 (|cFFFFCC00September 14th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Built-in custom displays has been updated to Legion.\n\n|cFFFFFF00-|r Raid Check (plugin) now checks for Legion food, rune and flash.\n\n|cFFFFFF00-|r removed the config button from the Player Details Window.\n\n|cFFFFFF00-|r the alert for this news window won't popup for each characters after the player opened it once for the update.\n\n|cFFFFFF00-|r added tooltip information for the two new arenas added in Legion.\n\n|cFFFFFF00v7.0.3.2941 (|cFFFFCC00September 13th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r fix for total bar where sometimes it desappears.\n\n|cFFFFFF00-|r fix for overall data reseting its elapsed time making dps and hps goes to millions.\n\n|cFFFFFF00-|r fix for overall not reseting when entering in a new dungeon.\n\n|cFFFFFF00-|r fix for trash cleanup on dungeons.\n\n|cFFFFFF00-|r fix for item level detection on dungeons.\n\n|cFFFFFF00-|r fix for artifact offhand always being counter as 750 item level.\n\n|cFFFFFF00-|r fix for segments menu sometimes not opening at all after a dungeon boss.\n\n|cFFFFFF00-|r fix for segments menu not showing the boss icon above the sub panel.\n\n|cFFFFFF00-|r fix for the top left corner of the window be ignoring the 'hide icon' setting at a /reload.\n\n|cFFFFFF00v7.0.3.2927 (|cFFFFCC00September 3rd, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Attempt to fix an issue with total bar hidding the latest bar shown.\n\n|cFFFFFF00v7.0.3.2899 (|cFFFFCC00August 26, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed a bug on tiny threat where it won't used the font set after a /reload.\n\n|cFFFFFF00-|r Bar spacing can now be set to -2 to 10 (from 0 to 10).\n\n|cFFFFFF00-|r Attempt to fix GBoM and Stormlash on dungeon boss fights.\n\n|cFFFFFF00v5.21 (|cFFFFCC00August 14, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for Monk's Soothing Mist on Streamer Plugin.\n\n|cFFFFFF00v5.20 (|cFFFFCC00August 13, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Warlock's Grimoire of Synergy buff uptime fix.\n\n|cFFFFFF00-|r Fix for the options panel background when using Classic panels.\n\n|cFFFFFF00-|r Tooltips are now slightly bigger.\n\n|cFFFFFF00-|r Fix for bookmark background where sometimes it has a light silver color.\n\n|cFFFFFF00-|r Fix for channel cast on Streamer Plugin.\n\n|cFFFFFF00-|r Legion followers fix.\n\n|cFFFFFF00-|r Boss detection for Legion dungeons.\n\n|cFFFFFF00-|r Priest spec detection review (thanks Yakumile-Azralon).\n\n|cFFFFFF00v5.15 (|cFFFFCC00August 5, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r fix for an error which happen sometimes during encounter start." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/classes/classe_custom.lua b/classes/classe_custom.lua index 03c5ce19..91e29242 100644 --- a/classes/classe_custom.lua +++ b/classes/classe_custom.lua @@ -2326,6 +2326,126 @@ ---------------------------------------------------------------------------------------------------------------------------------------------------- + +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + local DynamicOverallDamage = { + name = "Dynamic Overall Damage", + icon = [[Interface\ICONS\Achievement_Quests_Completed_08]], + attribute = false, + spellid = false, + author = "Details!", + desc = "Show overall damage done on the fly.", + source = false, + target = false, + script_version = 1, + script = [[ + --init: + local combat, instance_container, instance = ... + local total, top, amount = 0, 0, 0 + + --get the overall combat + local OverallCombat = Details:GetCombat (-1) + --get the current combat + local CurrentCombat = Details:GetCombat (0) + + --get the damage actor container for overall + local damage_container_overall = combat:GetActorList ( DETAILS_ATTRIBUTE_DAMAGE ) + --get the damage actor container for current + local damage_container_current = combat:GetActorList ( DETAILS_ATTRIBUTE_DAMAGE ) + + --do the loop: + for _, player in ipairs ( damage_container_overall ) do + --only player in group + if (player:IsGroupPlayer()) then + instance_container:AddValue (player, player.total) + end + end + + for _, player in ipairs ( damage_container_current ) do + --only player in group + if (player:IsGroupPlayer()) then + instance_container:AddValue (player, player.total) + end + end + + total, top = instance_container:GetTotalAndHighestValue() + amount = instance_container:GetNumActors() + + --return: + return total, top, amount + ]], + tooltip = [[ + --get the parameters passed + local actor, combat, instance = ... + + --get the cooltip object (we dont use the convencional GameTooltip here) + local GameCooltip = GameCooltip2 + + --Cooltip code + --get the overall combat + local OverallCombat = Details:GetCombat (-1) + --get the current combat + local CurrentCombat = Details:GetCombat (0) + + local AllSpells = {} + + --overall + local player = OverallCombat [1]:GetActor (actor.nome) + local playerSpells = player:GetSpellList() + for spellID, spellTable in pairs (playerSpells) do + AllSpells [spellID] = spellTable.total + end + + --current + local player = CurrentCombat [1]:GetActor (actor.nome) + local playerSpells = player:GetSpellList() + for spellID, spellTable in pairs (playerSpells) do + AllSpells [spellID] = (AllSpells [spellID] or 0) + (spellTable.total or 0) + end + + local sortedList = {} + for spellID, total in pairs (AllSpells) do + tinsert (sortedList, {spellID, total}) + end + table.sort (sortedList, Details.Sort2) + + local format_func = Details:GetCurrentToKFunction() + + --build the tooltip + for i, t in ipairs (sortedList) do + local spellID, total = unpack (t) + if (total > 1) then + local spellName, _, spellIcon = Details.GetSpellInfo (spellID) + + GameCooltip:AddLine (spellName, format_func (_, total)) + Details:AddTooltipBackgroundStatusbar() + GameCooltip:AddIcon (spellIcon, 1, 1, 14, 14) + end + end + ]], + } + + local have = false + for _, custom in ipairs (self.custom) do + if (custom.name == "Dynamic Overall Damage" and (custom.script_version and custom.script_version >= DynamicOverallDamage.script_version) ) then + have = true + break + end + end + if (not have) then + for i, custom in ipairs (self.custom) do + if (custom.name == "Dynamic Overall Damage") then + table.remove (self.custom, i) + end + end + setmetatable (DynamicOverallDamage, _detalhes.atributo_custom) + DynamicOverallDamage.__index = _detalhes.atributo_custom + self.custom [#self.custom+1] = DynamicOverallDamage + end + +--------------------------------------- + _detalhes:ResetCustomFunctionsCache() end diff --git a/core/parser.lua b/core/parser.lua index c68be5de..63c93af1 100644 --- a/core/parser.lua +++ b/core/parser.lua @@ -3422,6 +3422,12 @@ SPELL_POWER_OBSOLETE2 = 15; if (_detalhes.last_zone_type ~= zoneType) then _detalhes:SendEvent ("ZONE_TYPE_CHANGED", nil, zoneType) _detalhes.last_zone_type = zoneType + + for index, instancia in ipairs (_detalhes.tabela_instancias) do + if (instancia.ativa and instancia.hide_in_combat_type ~= 1) then --> 1 = none, we doesn't need to call + instancia:SetCombatAlpha (nil, nil, true) + end + end end _detalhes.time_type = _detalhes.time_type_original diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index d9c425e2..43397571 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -1868,6 +1868,14 @@ local barra_backdrop_onleave = { insets = {left = 1, right = 1, top = 0, bottom = 1} } +--> pre creating the truncate frame + _detalhes.left_anti_truncate = CreateFrame ("frame", "DetailsLeftTextAntiTruncate", UIParent) + _detalhes.left_anti_truncate:SetBackdrop (gump_fundo_backdrop) + _detalhes.left_anti_truncate:SetBackdropColor (0, 0, 0, 0.8) + _detalhes.left_anti_truncate:SetFrameStrata ("FULLSCREEN") + _detalhes.left_anti_truncate.text = _detalhes.left_anti_truncate:CreateFontString (nil, "overlay", "GameFontNormal") + _detalhes.left_anti_truncate.text:SetPoint ("left", _detalhes.left_anti_truncate, "left", 3, 0) + local barra_scripts_onenter = function (self) self.mouse_over = true OnEnterMainWindow (self._instance, self) @@ -1888,12 +1896,7 @@ local barra_scripts_onenter = function (self) local lefttext = self.texto_esquerdo if (lefttext:IsTruncated()) then if (not _detalhes.left_anti_truncate) then - _detalhes.left_anti_truncate = CreateFrame ("frame", "DetailsLeftTextAntiTruncate", UIParent) - _detalhes.left_anti_truncate:SetBackdrop (gump_fundo_backdrop) - _detalhes.left_anti_truncate:SetBackdropColor (0, 0, 0, 0.8) - _detalhes.left_anti_truncate:SetFrameStrata ("FULLSCREEN") - _detalhes.left_anti_truncate.text = _detalhes.left_anti_truncate:CreateFontString (nil, "overlay", "GameFontNormal") - _detalhes.left_anti_truncate.text:SetPoint ("left", _detalhes.left_anti_truncate, "left", 3, 0) + end _detalhes:SetFontSize (_detalhes.left_anti_truncate.text, self._instance.row_info.font_size) @@ -4878,6 +4881,7 @@ function _detalhes:SetWindowAlphaForInteract (alpha) end +-- ~autohide ãutohide function _detalhes:SetWindowAlphaForCombat (entering_in_combat, true_hide) local amount, rowsamount, menuamount @@ -6660,17 +6664,19 @@ function _detalhes:SetCombatAlpha (modify_type, alpha_amount, interacting) end elseif (self.hide_in_combat_type == 5) then --"While Not Inside Instance" - if ((_detalhes.zone_type == "raid" or _detalhes.zone_type == "party") and IsInInstance()) then - self:SetWindowAlphaForCombat (true, true) --> hida a janela - else + local isInInstance = IsInInstance() + if (isInInstance or _detalhes.zone_type == "raid" or _detalhes.zone_type == "party") then self:SetWindowAlphaForCombat (false) --> deshida a janela + else + self:SetWindowAlphaForCombat (true, true) --> hida a janela end elseif (self.hide_in_combat_type == 6) then --"While Inside Instance" - if ((_detalhes.zone_type == "raid" or _detalhes.zone_type == "party") and IsInInstance()) then - self:SetWindowAlphaForCombat (false) --> deshida a janela - else + local isInInstance = IsInInstance() + if (isInInstance or _detalhes.zone_type == "raid" or _detalhes.zone_type == "party") then self:SetWindowAlphaForCombat (true, true) --> hida a janela + else + self:SetWindowAlphaForCombat (false) --> deshida a janela end elseif (self.hide_in_combat_type == 7) then --"Raid Debug" = Out of Combat and Inside Raid or Dungeon