From 76fb7725a19f42db655d605951b371e5aae244f2 Mon Sep 17 00:00:00 2001 From: Tercioo Date: Sat, 9 Jan 2016 23:17:55 -0200 Subject: [PATCH] - Fix for the weakauras creator for DBM and BidWigs Timers. - Fix for an issue with dungeon bosses where sometimes Details! throw some error messages. - Attempt to fix a 'class undefined' bug. --- boot.lua | 17 +- classes/container_combatentes.lua | 3 + core/control.lua | 2 +- functions/link.lua | 609 ++++++++++++++++++------------ 4 files changed, 375 insertions(+), 256 deletions(-) diff --git a/boot.lua b/boot.lua index e6173a84..7dcd30d3 100644 --- a/boot.lua +++ b/boot.lua @@ -3,12 +3,12 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.build_counter = 2186 --it's 2186 for release - _detalhes.userversion = "v4.1.4a" - _detalhes.realversion = 77 --core version + _detalhes.build_counter = 2196 --it's 2196 for release + _detalhes.userversion = "v4.1.5" + _detalhes.realversion = 78 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" Details = _detalhes - + ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> initialization stuff @@ -21,13 +21,16 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ -|cFFFFFF00v4.1.4 (|cFFFFCC00Jan 03, 2016|r|cFFFFFF00)|r:\n\n -|cFFFFFF00-|r Fixed an issue with the segment plugin for the statusbar.\n\n +|cFFFFFF00v4.1.5 (|cFFFFCC00Jan 10, 2016|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r Fix for the weakauras creator for DBM and BidWigs Timers.\n\n +|cFFFFFF00-|r Fix for an issue with dungeon bosses where sometimes Details! throw some error messages.\n\n +|cFFFFFF00-|r Attempt to fix a 'class undefined' bug.\n\n + --]] -- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v4.1.4 (|cFFFFCC00Jan 03, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with the segment plugin for the statusbar.\n\n|cFFFFFF00v4.1.3 (|cFFFFCC00Jan 01, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Small visual improvement on tooltips.\n\n|cFFFFFF00-|r Fixed an issue when closing solo plugins with the red X button.\n\n|cFFFFFF00v4.1.2 (|cFFFFCC00Dec 31, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for item level tracker.\n\n|cFFFFFF00v4.1.1 (|cFFFFCC00Dec 23, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Using LibItemUpgradeInfo library to retrive the item level of upgraded items.\n\n|cFFFFFF00v4.1.0 (|cFFFFCC00Dec 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added new skin preset: 'New Gray'.\n\n|cFFFFFF00-|r Added a Dark skin for the Options Panel.\n\n|cFFFFFF00-|r Fixed an issue with the Plugin DPS Tuning when reseting data on Details!.\n\n|cFFFFFF00-|r Removed realm names from player at the Comparison Panel.\n\n|cFFFFFF00v4.0.8 (|cFFFFCC00Dec 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Framework and functions update for the next version of the Advanced Death Logs plugin.\n\n|cFFFFFF00v4.0.7 (|cFFFFCC00Dec 07, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed some corner border for elvui skins.\n\n|cFFFFFF00-|r /run Details.death_tooltip_width = 500 makes the deathlog tooltip be 500 width.\n\n|cFFFFFF00v4.0.6e (|cFFFFCC00Nov 23, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue where sometimes some actors are duplicated at the end of an encounter.\n\n|cFFFFFF00-|r Fixed bookmark for segments (shift+right click).\n\n|cFFFFFF00-|r Fixed an issue with Chat Tab Embed when embeding only one window.\n\n|cFFFFFF00v4.0.6c (|cFFFFCC00Nov 04, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option for numeral system: Western/East Asian.\n\n|cFFFFFF00v4.0.5c (|cFFFFCC00Oct 24, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option to disable the all-displays window (right click on title bar).\n\n|cFFFFFF00-|r Added an option to suppress segment changes after killing a boss encounter (experimental).\n\n|cFFFFFF00-|r Fixed pet battles auto hide.\n\n|cFFFFFF00-|r Fixed an issue with bar animations starting from the middle of the bar.\n\n|cFFFFFF00-|r Fixed buffs and spell cast start on weakauras creator tool.\n\n|cFFFFFF00v4.0.3a (|cFFFFCC00Set 29, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for an error on Damage Taken By Spell display.\n\n|cFFFFFF00v4.0.3 (|cFFFFCC00Set 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Some improvements on Plugin's icon at the title bar.\n\n|cFFFFFF00v4.0.2 (|cFFFFCC00Set 26, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added 'ShielTronic Shield' on HealthPotion & Stone display.\n\n|cFFFFFF00-|r Improvements done on Vanguard Plugin.\n\n|cFFFFFF00-|r Fixed an alignment issue which was happening with few tooltips.\n\n|cFFFFFF00-|r Fixed a problem where sometimes the addon crashes while doing a /reload during raid.\n\n|cFFFFFF00-|r Fixed the creation of auras for weakauras from the Forge (/details forge).\n\n|cFFFFFF00v4.0.1 (|cFFFFCC00Set 21, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an options to use a customized skin file.\n\n|cFFFFFF00-|r Added an options to use a customized bar texture file.\n\n|cFFFFFF00-|r A Package with photoshop files with examples and the skin file for Minimalistic skin are available at WoW Interface.\n\n|cFFFFFF00-|r Added 'API Custom Displays.txt' on Details! folder, this file explain how to create scripts for custom displays.\n\n|cFFFFFF00v4.0h (|cFFFFCC00Set 19, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Created new plugin 'Target Caller' for RBGs, it's available at Curse.com.\n\n|cFFFFFF00-|r Fixed death display color when not using colored by the player class.\n\n|cFFFFFF00-|r Fixed a rare bug where the window for Encounter Details Plugin won't open when clicking on its icon.\n\n|cFFFFFF00-|r Added officer channel to 'Announce Death' feature.\n\n|cFFFFFF00v4.0f (|cFFFFCC00Set 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for the title bar encounter timer.\n\n|cFFFFFF00v4.0e (|cFFFFCC00Set 14, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a custom display for Crowd Control Received.\n\n|cFFFFFF00-|r Weak Aura Creator Tool, now has full support for BigWigs and Dbm time bars.\n\n|cFFFFFF00-|r Auras for interrupt and dispelling has been added on the Weak Aura Creator Tool.\n\n|cFFFFFF00-|r Details! Forge now has support for DBM and BigWigs time bars.\n\n|cFFFFFF00-|r Solo Plugins now has a close button on their panels.\n\n|cFFFFFF00-|r Fixed damage/healing score message after a boss kill.\n\n|cFFFFFF00-|r Now, an alert to open the history panel is shown after killing a boss.\n\n|cFFFFFF00-|r Added a 'all-displays' menu when right clicking title bar.\n\n|cFFFFFF00-|r Removed few texture from bookmarks panel, now it has a more clean appearance.\n\n|cFFFFFF00-|r Updated Details! Framework.\n\n|cFFFFFF00-|r Added option in order to change the bar orientation.\n\n|cFFFFFF00-|r Added an option to make the menus on title bar work with clicks instead of hovering over them.\n\n|cFFFFFF00-|r Healing for battleground enemies is now placed on healing done instead of enemy healing done.\n\n|cFFFFFF00-|r Improvements on our support for Arena battles.\n\n|cFFFFFF00-|r Fixed some issues on the Player Detail Window.\n\n|cFFFFFF00-|r Fixed encounter time on title bar text.\n\n|cFFFFFF00-|r Fixed death display tooltip, wasn't respecting the font and size set on options panel.\n\n|cFFFFFF00v3.18.5 (|cFFFFCC00Aug 19, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Improvements on Weakauras creation from Encounter Details plugin.\n\n|cFFFFFF00-|r Improvements on 'Auto Switch to Current' feature. Details! windows are now more responsible about auto changing a segment while the player, for instance, has the report window opened.\n\n|cFFFFFF00-|r Added slash command '/de wipe'. It ends the raid encounter segment and stop capturing data.\nIf you are the raid leader, all other users of Details! will also stop.\nWorks great for players not make damage padding after a wipe call.\n\n|cFFFFFF00-|r Added the overheal made by pets on tooltip and player details window.\n\n|cFFFFFF00-|r Added an option to disable stretch button and bar highlight.\n\n|cFFFFFF00-|r Disabling nicknames now also disable avatars.\n\n|cFFFFFF00-|r Added 'spinal healing injector' on custom display 'Health Potion & Stone' used.\n\n|cFFFFFF00-|r Fixed title text width when auto-hide menu buttons is enabled.\n\n|cFFFFFF00-|r Fixed item level of timewarped items.\n\n|cFFFFFF00-|r Fixed report for custom display Crowd Control.\n\n|cFFFFFF00-|r Fixed role icons on custom displays.\n\n|cFFFFFF00-|r Fixed an issue with dropdown boxes where wasn't showing all options.\n\n|cFFFFFF00-|r Fixed Ticket #53: background alpha after stretching which wasn't correctly coming back to original color.\n\n|cFFFFFF00-|r Fixed ticket #51: API Call 'GetCombat('overall')' wasn't returning the overall combat object.\n\n|cFFFFFF00-|r Fixed ticket #50: issue opening icon selection frame.\n\n|cFFFFFF00v3.17.12 (|cFFFFCC00Aug 05, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option for lock micro displays. When locked they don't interact with mouse or stay on top of menus.\n\n|cFFFFFF00-|r Fixed ticket #49: death display not working correctly with sort direction bottom-to-top.\n\n|cFFFFFF00-|r Fixed an issue with death display where the text wasn't updating their width correctly." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v4.1.5 (|cFFFFCC00Jan 10, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for the weakauras creator for DBM and BidWigs Timers.\n\n|cFFFFFF00-|r Fix for an issue with dungeon bosses where sometimes Details! throw some error messages.\n\n|cFFFFFF00-|r Attempt to fix a 'class undefined' bug.\n\n|cFFFFFF00v4.1.4 (|cFFFFCC00Jan 03, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with the segment plugin for the statusbar.\n\n|cFFFFFF00v4.1.3 (|cFFFFCC00Jan 01, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Small visual improvement on tooltips.\n\n|cFFFFFF00-|r Fixed an issue when closing solo plugins with the red X button.\n\n|cFFFFFF00v4.1.2 (|cFFFFCC00Dec 31, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for item level tracker.\n\n|cFFFFFF00v4.1.1 (|cFFFFCC00Dec 23, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Using LibItemUpgradeInfo library to retrive the item level of upgraded items.\n\n|cFFFFFF00v4.1.0 (|cFFFFCC00Dec 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added new skin preset: 'New Gray'.\n\n|cFFFFFF00-|r Added a Dark skin for the Options Panel.\n\n|cFFFFFF00-|r Fixed an issue with the Plugin DPS Tuning when reseting data on Details!.\n\n|cFFFFFF00-|r Removed realm names from player at the Comparison Panel.\n\n|cFFFFFF00v4.0.8 (|cFFFFCC00Dec 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Framework and functions update for the next version of the Advanced Death Logs plugin.\n\n|cFFFFFF00v4.0.7 (|cFFFFCC00Dec 07, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed some corner border for elvui skins.\n\n|cFFFFFF00-|r /run Details.death_tooltip_width = 500 makes the deathlog tooltip be 500 width.\n\n|cFFFFFF00v4.0.6e (|cFFFFCC00Nov 23, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue where sometimes some actors are duplicated at the end of an encounter.\n\n|cFFFFFF00-|r Fixed bookmark for segments (shift+right click).\n\n|cFFFFFF00-|r Fixed an issue with Chat Tab Embed when embeding only one window.\n\n|cFFFFFF00v4.0.6c (|cFFFFCC00Nov 04, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option for numeral system: Western/East Asian.\n\n|cFFFFFF00v4.0.5c (|cFFFFCC00Oct 24, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option to disable the all-displays window (right click on title bar).\n\n|cFFFFFF00-|r Added an option to suppress segment changes after killing a boss encounter (experimental).\n\n|cFFFFFF00-|r Fixed pet battles auto hide.\n\n|cFFFFFF00-|r Fixed an issue with bar animations starting from the middle of the bar.\n\n|cFFFFFF00-|r Fixed buffs and spell cast start on weakauras creator tool.\n\n|cFFFFFF00v4.0.3a (|cFFFFCC00Set 29, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for an error on Damage Taken By Spell display.\n\n|cFFFFFF00v4.0.3 (|cFFFFCC00Set 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Some improvements on Plugin's icon at the title bar.\n\n|cFFFFFF00v4.0.2 (|cFFFFCC00Set 26, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added 'ShielTronic Shield' on HealthPotion & Stone display.\n\n|cFFFFFF00-|r Improvements done on Vanguard Plugin.\n\n|cFFFFFF00-|r Fixed an alignment issue which was happening with few tooltips.\n\n|cFFFFFF00-|r Fixed a problem where sometimes the addon crashes while doing a /reload during raid.\n\n|cFFFFFF00-|r Fixed the creation of auras for weakauras from the Forge (/details forge).\n\n|cFFFFFF00v4.0.1 (|cFFFFCC00Set 21, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an options to use a customized skin file.\n\n|cFFFFFF00-|r Added an options to use a customized bar texture file.\n\n|cFFFFFF00-|r A Package with photoshop files with examples and the skin file for Minimalistic skin are available at WoW Interface.\n\n|cFFFFFF00-|r Added 'API Custom Displays.txt' on Details! folder, this file explain how to create scripts for custom displays.\n\n|cFFFFFF00v4.0h (|cFFFFCC00Set 19, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Created new plugin 'Target Caller' for RBGs, it's available at Curse.com.\n\n|cFFFFFF00-|r Fixed death display color when not using colored by the player class.\n\n|cFFFFFF00-|r Fixed a rare bug where the window for Encounter Details Plugin won't open when clicking on its icon.\n\n|cFFFFFF00-|r Added officer channel to 'Announce Death' feature.\n\n|cFFFFFF00v4.0f (|cFFFFCC00Set 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for the title bar encounter timer.\n\n|cFFFFFF00v4.0e (|cFFFFCC00Set 14, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a custom display for Crowd Control Received.\n\n|cFFFFFF00-|r Weak Aura Creator Tool, now has full support for BigWigs and Dbm time bars.\n\n|cFFFFFF00-|r Auras for interrupt and dispelling has been added on the Weak Aura Creator Tool.\n\n|cFFFFFF00-|r Details! Forge now has support for DBM and BigWigs time bars.\n\n|cFFFFFF00-|r Solo Plugins now has a close button on their panels.\n\n|cFFFFFF00-|r Fixed damage/healing score message after a boss kill.\n\n|cFFFFFF00-|r Now, an alert to open the history panel is shown after killing a boss.\n\n|cFFFFFF00-|r Added a 'all-displays' menu when right clicking title bar.\n\n|cFFFFFF00-|r Removed few texture from bookmarks panel, now it has a more clean appearance.\n\n|cFFFFFF00-|r Updated Details! Framework.\n\n|cFFFFFF00-|r Added option in order to change the bar orientation.\n\n|cFFFFFF00-|r Added an option to make the menus on title bar work with clicks instead of hovering over them.\n\n|cFFFFFF00-|r Healing for battleground enemies is now placed on healing done instead of enemy healing done.\n\n|cFFFFFF00-|r Improvements on our support for Arena battles.\n\n|cFFFFFF00-|r Fixed some issues on the Player Detail Window.\n\n|cFFFFFF00-|r Fixed encounter time on title bar text.\n\n|cFFFFFF00-|r Fixed death display tooltip, wasn't respecting the font and size set on options panel.\n\n|cFFFFFF00v3.18.5 (|cFFFFCC00Aug 19, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Improvements on Weakauras creation from Encounter Details plugin.\n\n|cFFFFFF00-|r Improvements on 'Auto Switch to Current' feature. Details! windows are now more responsible about auto changing a segment while the player, for instance, has the report window opened.\n\n|cFFFFFF00-|r Added slash command '/de wipe'. It ends the raid encounter segment and stop capturing data.\nIf you are the raid leader, all other users of Details! will also stop.\nWorks great for players not make damage padding after a wipe call.\n\n|cFFFFFF00-|r Added the overheal made by pets on tooltip and player details window.\n\n|cFFFFFF00-|r Added an option to disable stretch button and bar highlight.\n\n|cFFFFFF00-|r Disabling nicknames now also disable avatars.\n\n|cFFFFFF00-|r Added 'spinal healing injector' on custom display 'Health Potion & Stone' used.\n\n|cFFFFFF00-|r Fixed title text width when auto-hide menu buttons is enabled.\n\n|cFFFFFF00-|r Fixed item level of timewarped items.\n\n|cFFFFFF00-|r Fixed report for custom display Crowd Control.\n\n|cFFFFFF00-|r Fixed role icons on custom displays.\n\n|cFFFFFF00-|r Fixed an issue with dropdown boxes where wasn't showing all options.\n\n|cFFFFFF00-|r Fixed Ticket #53: background alpha after stretching which wasn't correctly coming back to original color.\n\n|cFFFFFF00-|r Fixed ticket #51: API Call 'GetCombat('overall')' wasn't returning the overall combat object.\n\n|cFFFFFF00-|r Fixed ticket #50: issue opening icon selection frame." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/classes/container_combatentes.lua b/classes/container_combatentes.lua index 6c9a1d3f..83996d78 100644 --- a/classes/container_combatentes.lua +++ b/classes/container_combatentes.lua @@ -386,6 +386,9 @@ novo_objeto.nome = nome novo_objeto.flag_original = flag novo_objeto.serial = serial + + --> seta a classe default para desconhecido, assim nenhum objeto fica com classe nil + novo_objeto.classe = "UNKNOW" -- tipo do container ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ diff --git a/core/control.lua b/core/control.lua index 0f1e1434..25b5cb60 100644 --- a/core/control.lua +++ b/core/control.lua @@ -1235,7 +1235,7 @@ end function _detalhes:CheckFor_SuppressedWindowsOnEncounterFound() for _, instance in _detalhes:ListInstances() do - if (instance.ativa and instance.baseframe and instance.last_interaction > _tempo and instance.segmento == 0) then + if (instance.ativa and instance.baseframe and (not instance.last_interaction or instance.last_interaction > _tempo) and instance.segmento == 0) then _detalhes:TrocaSegmentoAtual (instance, true) end end diff --git a/functions/link.lua b/functions/link.lua index 6f32fe04..05bf6f71 100644 --- a/functions/link.lua +++ b/functions/link.lua @@ -405,175 +405,324 @@ } local bar_dbm_timerbar_prototype = { - ["sparkWidth"] = 17, - ["stacksSize"] = 12, - ["xOffset"] = -278.999633789063, - ["stacksFlags"] = "None", - ["yOffset"] = 182.37451171875, - ["anchorPoint"] = "CENTER", - ["borderColor"] = {1, 1, 1, 0.5}, - ["rotateText"] = "NONE", - ["backgroundColor"] = {0, 0, 0, 0.5}, - ["fontFlags"] = "OUTLINE", - ["icon_color"] = {1, 1, 1, 1}, - ["selfPoint"] = "CENTER", - ["barColor"] = { - 0.996078431372549, - 1, - 0.976470588235294, - 1, - }, - ["desaturate"] = false, - ["sparkOffsetY"] = 0, - ["load"] = { - ["difficulty"] = { - ["multi"] = { + ["sparkWidth"] = 30, + ["stacksSize"] = 12, + ["xOffset"] = -102.999938964844, + ["stacksFlags"] = "None", + ["yOffset"] = 328.723449707031, + ["anchorPoint"] = "CENTER", + ["borderColor"] = {0, 0, 0, 1}, + ["rotateText"] = "NONE", + ["backgroundColor"] = { + 0, -- [1] + 0, -- [2] + 0, -- [3] + 0.5, -- [4] + }, + ["fontFlags"] = "OUTLINE", + ["icon_color"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + 1, -- [4] + }, + ["selfPoint"] = "CENTER", + ["barColor"] = { + 0.976470588235294, -- [1] + 0.992156862745098, -- [2] + 1, -- [3] + 0.683344513177872, -- [4] + }, + ["desaturate"] = false, + ["sparkOffsetY"] = 0, + ["load"] = { + ["difficulty"] = { + ["multi"] = { + }, + }, + ["race"] = { + ["multi"] = { + }, + }, + ["role"] = { + ["multi"] = { + }, + }, + ["talent"] = { + ["multi"] = { + }, + }, + ["class"] = { + ["multi"] = { + }, + }, + ["spec"] = { + ["multi"] = { + }, + }, + ["faction"] = { + ["multi"] = { + }, + }, + ["size"] = { + ["multi"] = { + }, }, }, - ["race"] = { - ["multi"] = { + ["timerColor"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + 1, -- [4] + }, + ["regionType"] = "aurabar", + ["stacks"] = false, + ["sparkDesaturate"] = false, + ["texture"] = "Blizzard Raid Bar", + ["textFont"] = "Friz Quadrata TT", + ["zoom"] = 0.3, + ["spark"] = true, + ["timerFont"] = "Friz Quadrata TT", + ["alpha"] = 1, + ["borderInset"] = 4, + ["displayIcon"] = "REPLACE-ME", + ["textColor"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + 1, -- [4] + }, + ["borderBackdrop"] = "Blizzard Tooltip", + ["barInFront"] = true, + ["sparkRotationMode"] = "AUTO", + ["displayTextLeft"] = "REPLACE-ME", + ["animation"] = { + ["start"] = { + ["duration_type"] = "seconds", + ["type"] = "none", + }, + ["main"] = { + ["duration_type"] = "seconds", + ["type"] = "none", + }, + ["finish"] = { + ["duration_type"] = "seconds", + ["type"] = "none", }, }, - ["talent"] = { - ["multi"] = { + ["trigger"] = { + ["type"] = "custom", + ["subeventSuffix"] = "_CAST_START", + ["custom"] = "function() return true end", + ["event"] = "Health", + ["unit"] = "player", + ["customDuration"] = "function()\n return aura_env.reimaningTime, (aura_env.enabledAt or 0) + aura_env.reimaningTime\nend", + ["custom_type"] = "status", + ["spellIds"] = { + }, + ["custom_hide"] = "timed", + ["check"] = "update", + ["subeventPrefix"] = "SPELL", + ["names"] = { + }, + ["debuffType"] = "HELPFUL", + }, + ["text"] = true, + ["stickyDuration"] = false, + ["height"] = 40, + ["timerFlags"] = "None", + ["sparkBlendMode"] = "ADD", + ["backdropColor"] = { + 0, -- [1] + 0, -- [2] + 0, -- [3] + 1, -- [4] + }, + ["additional_triggers"] = { + { + ["trigger"] = { + ["type"] = "status", + ["spellId"] = "999999", + ["subeventSuffix"] = "_CAST_START", + ["use_spellId"] = true, + ["remaining_operator"] = "<=", + ["event"] = "DBM Timer", + ["subeventPrefix"] = "SPELL", + ["remaining"] = "5", + ["unit"] = "player", + ["use_unit"] = true, + ["unevent"] = "auto", + ["use_remaining"] = true, + }, + ["untrigger"] = { + }, + }, -- [1] + }, + ["actions"] = { + ["start"] = { + ["do_custom"] = true, + ["custom"] = "aura_env.enabledAt = GetTime()", + }, + ["finish"] = { + }, + ["init"] = { + ["do_custom"] = true, + ["custom"] = "aura_env.reimaningTime = 5", }, }, - ["role"] = { - ["multi"] = { - }, + ["untrigger"] = { }, - ["spec"] = { - ["multi"] = { - }, + ["textFlags"] = "None", + ["border"] = false, + ["borderEdge"] = "1 Pixel", + ["sparkOffsetX"] = 1, + ["borderSize"] = 1, + ["stacksFont"] = "Friz Quadrata TT", + ["icon_side"] = "LEFT", + ["textSize"] = 16, + ["timer"] = true, + ["sparkHeight"] = 73, + ["sparkRotation"] = 0, + ["customTextUpdate"] = "update", + ["stacksColor"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + 1, -- [4] }, - ["class"] = { - ["multi"] = { - }, + ["displayTextRight"] = "%p", + ["icon"] = true, + ["inverse"] = false, + ["frameStrata"] = 1, + ["width"] = 450, + ["sparkColor"] = { + 0.976470588235294, -- [1] + 0.992156862745098, -- [2] + 1, -- [3] + 0.355040311813355, -- [4] }, - ["size"] = { - ["multi"] = { - }, - }, - }, - ["timerColor"] = {1, 1, 1, 1}, - ["regionType"] = "aurabar", - ["stacks"] = true, - ["texture"] = "Blizzard", - ["textFont"] = "Friz Quadrata TT", - ["zoom"] = 0, - ["spark"] = true, - ["timerFont"] = "Friz Quadrata TT", - ["alpha"] = 1, - ["borderInset"] = 11, - ["displayIcon"] = "Interface\\Icons\\Spell_Shadow_MindTwisting", - ["textColor"] = {1, 1, 1, 1}, - ["borderBackdrop"] = "Blizzard Tooltip", - ["barInFront"] = true, - ["sparkRotationMode"] = "AUTO", - ["displayTextLeft"] = "%n", - ["animation"] = { - ["start"] = { - ["duration_type"] = "seconds", - ["type"] = "none", - }, - ["main"] = { - ["duration_type"] = "seconds", - ["type"] = "none", - }, - ["finish"] = { - ["duration_type"] = "seconds", - ["type"] = "none", - }, - }, - ["trigger"] = { - ["type"] = "status", - ["use_id"] = true, - ["subeventSuffix"] = "_CAST_START", - ["id"] = "", - ["remaining_operator"] = "<=", - ["event"] = "DBM Timer", - ["unit"] = "player", - ["use_remaining"] = true, - ["remaining"] = "6", - ["spellIds"] = { - }, - ["use_unit"] = true, - ["unevent"] = "auto", - ["subeventPrefix"] = "SPELL", - ["names"] = { - }, - ["debuffType"] = "HELPFUL", - }, - ["text"] = true, - ["stickyDuration"] = false, - ["height"] = 34.4247055053711, - ["timerFlags"] = "None", - ["sparkBlendMode"] = "ADD", - ["backdropColor"] = {1, 1, 1, 0.5}, - ["actions"] = { - ["start"] = { - ["do_custom"] = true, - ["custom"] = "aura_env.untrigger_at = GetTime() + aura_env.remaining_trigger", - }, - ["finish"] = { - }, - ["init"] = { - ["do_custom"] = true, - ["custom"] = "", - }, - }, - ["untrigger"] = { - }, - ["textFlags"] = "None", - ["border"] = false, - ["borderEdge"] = "None", - ["sparkOffsetX"] = 0, - ["borderSize"] = 16, - ["stacksFont"] = "Friz Quadrata TT", - ["icon_side"] = "LEFT", - ["textSize"] = 14, - ["timer"] = true, - ["sparkHeight"] = 55, - ["sparkRotation"] = 0, - ["customTextUpdate"] = "update", - ["stacksColor"] = {1, 1, 1, 1}, - ["displayTextRight"] = "%p", - ["icon"] = true, - ["inverse"] = false, - ["frameStrata"] = 1, - ["width"] = 371.000183105469, - ["sparkColor"] = {1, 1, 1, 1}, - ["timerSize"] = 14, - ["numTriggers"] = 1, - ["sparkDesature"] = false, - ["orientation"] = "HORIZONTAL", - ["borderOffset"] = 5, - ["auto"] = false, - ["sparkTexture"] = "Interface\\CastingBar\\UI-CastingBar-Spark", + ["timerSize"] = 16, + ["numTriggers"] = 2, + ["sparkDesature"] = false, + ["orientation"] = "HORIZONTAL", + ["borderOffset"] = 10, + ["auto"] = true, + ["sparkTexture"] = "Interface\\CastingBar\\UI-CastingBar-Spark", } - + local icon_dbm_timerbar_prototype = { - ["cooldown"] = true, - ["fontSize"] = 14, - ["displayStacks"] = "Proxima Abilidate Em:", + ["xOffset"] = -110, + ["yOffset"] = 182.978759765625, + ["anchorPoint"] = "CENTER", + ["customTextUpdate"] = "update", + ["icon"] = true, + ["fontFlags"] = "OUTLINE", + ["selfPoint"] = "CENTER", + ["trigger"] = { + ["type"] = "custom", + ["subeventSuffix"] = "_CAST_START", + ["event"] = "Health", + ["unit"] = "player", + ["customDuration"] = "function()\n return aura_env.reimaningTime, (aura_env.enabledAt or 0) + aura_env.reimaningTime\nend", + ["custom"] = "function() return true end", + ["spellIds"] = { + }, + ["custom_type"] = "status", + ["check"] = "update", + ["subeventPrefix"] = "SPELL", + ["names"] = { + }, + ["debuffType"] = "HELPFUL", + }, + ["desaturate"] = false, + ["font"] = "Friz Quadrata TT", + ["height"] = 200.170227050781, + ["load"] = { + ["difficulty"] = { + ["multi"] = { + }, + }, + ["race"] = { + ["multi"] = { + }, + }, + ["role"] = { + ["multi"] = { + }, + }, + ["talent"] = { + ["multi"] = { + }, + }, + ["spec"] = { + ["multi"] = { + }, + }, + ["class"] = { + ["multi"] = { + }, + }, + ["faction"] = { + ["multi"] = { + }, + }, + ["size"] = { + ["multi"] = { + }, + }, + }, + ["fontSize"] = 24, + ["displayStacks"] = "", + ["regionType"] = "icon", + ["init_completed"] = 1, ["actions"] = { ["start"] = { ["do_custom"] = true, - ["custom"] = "aura_env.untrigger_at = GetTime() + aura_env.remaining_trigger", + ["custom"] = "aura_env.enabledAt = GetTime()\n\n\n\n", }, ["finish"] = { }, ["init"] = { ["do_custom"] = true, - ["custom"] = "", + ["custom"] = "aura_env.reimaningTime = 5", }, }, - ["color"] = {1, 1, 1, 1}, - ["width"] = 100, + ["cooldown"] = true, + ["stacksContainment"] = "OUTSIDE", + ["zoom"] = 0.3, + ["auto"] = true, + ["additional_triggers"] = { + { + ["trigger"] = { + ["type"] = "status", + ["spellId"] = "999999", + ["subeventSuffix"] = "_CAST_START", + ["use_spellId"] = true, + ["remaining_operator"] = "<=", + ["event"] = "DBM Timer", + ["subeventPrefix"] = "SPELL", + ["remaining"] = "5", + ["unit"] = "player", + ["use_unit"] = true, + ["unevent"] = "auto", + ["use_remaining"] = true, + }, + ["untrigger"] = { + }, + }, -- [1] + }, + ["color"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + 1, -- [4] + }, + ["frameStrata"] = 1, + ["width"] = 206.000076293945, ["untrigger"] = { }, - ["yOffset"] = 230.935302734375, - ["anchorPoint"] = "CENTER", + ["inverse"] = false, + ["numTriggers"] = 2, ["animation"] = { ["start"] = { ["duration_type"] = "seconds", @@ -588,75 +737,15 @@ ["type"] = "none", }, }, - ["regionType"] = "icon", - ["stacksPoint"] = "BOTTOM", - ["customTextUpdate"] = "update", - ["icon"] = true, - ["fontFlags"] = "OUTLINE", - ["stacksContainment"] = "OUTSIDE", - ["zoom"] = 0, - ["auto"] = true, - ["selfPoint"] = "CENTER", - ["trigger"] = { - ["type"] = "status", - ["use_id"] = true, - ["subeventSuffix"] = "_CAST_START", - ["id"] = "", - ["remaining_operator"] = "<=", - ["event"] = "DBM Timer", - ["unit"] = "player", - ["use_remaining"] = true, - ["remaining"] = "6", - ["spellIds"] = { - }, - ["use_unit"] = true, - ["unevent"] = "auto", - ["subeventPrefix"] = "SPELL", - ["names"] = { - }, - ["debuffType"] = "HELPFUL", - }, ["stickyDuration"] = false, - ["frameStrata"] = 1, - ["desaturate"] = false, - ["xOffset"] = -486.999969482422, - ["font"] = "Friz Quadrata TT", - ["numTriggers"] = 1, - ["inverse"] = true, - ["height"] = 100, - ["load"] = { - ["difficulty"] = { - ["multi"] = { - }, - }, - ["race"] = { - ["multi"] = { - }, - }, - ["use_encounterid"] = true, - ["talent"] = { - ["multi"] = { - }, - }, - ["role"] = { - ["multi"] = { - }, - }, - ["spec"] = { - ["multi"] = { - }, - }, - ["class"] = { - ["multi"] = { - }, - }, - ["size"] = { - ["multi"] = { - }, - }, + ["displayIcon"] = "Interface\\Icons\\Spell_Fire_Fire", + ["stacksPoint"] = "BOTTOM", + ["textColor"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + 1, -- [4] }, - ["textColor"] = {1, 1, 1, 1}, - ["displayIcon"] = "", } local text_dbm_timerbar_prototype = { @@ -1277,6 +1366,8 @@ new_aura.fontSize = min (icon_size, 24) elseif (other_values.dbm_timer_id or other_values.bw_timer_id) then + + --> create the default aura table if (aura_type == "icon") then new_aura = _detalhes.table.copy ({}, icon_dbm_timerbar_prototype) elseif (aura_type == "aurabar") then @@ -1285,52 +1376,18 @@ new_aura = _detalhes.table.copy ({}, text_dbm_timerbar_prototype) end + --> text and icon if (aura_type == "aurabar") then icon_text = icon_text:gsub ("= ", "") icon_text = icon_text:gsub (" =", "") icon_text = icon_text:gsub ("=", "") new_aura.displayTextLeft = icon_text new_aura.displayIcon = icon_texture - elseif (aura_type == "icon") then new_aura.displayStacks = icon_text new_aura.displayIcon = icon_texture - end - local init_start = [[ - aura_env.ability_text = "@text" - aura_env.remaining_trigger = @countdown - ]] - - init_start = init_start:gsub ("@text", icon_text) - init_start = init_start:gsub ("@countdown", floor (stacksize)) - new_aura.trigger.remaining = tostring (floor (stacksize)) - - new_aura.actions.init.custom = init_start - - if (other_values.dbm_timer_id) then - new_aura.trigger.event = "DBM Timer" - local timerId = tostring (other_values.dbm_timer_id) - if (timerId:find ("%s")) then - new_aura.trigger.id = "" - new_aura.trigger.use_id = false - new_aura.trigger.spellId_operator = "==" - new_aura.trigger.use_spellId = true - new_aura.trigger.spellId = tostring (other_values.spellid) - else - new_aura.trigger.id = timerId - end - - elseif (other_values.bw_timer_id) then - new_aura.trigger.id = "" - new_aura.trigger.use_id = false - new_aura.trigger.spellId_operator = "==" - new_aura.trigger.use_spellId = true - new_aura.trigger.spellId = tostring (other_values.bw_timer_id) - new_aura.trigger.event = "BigWigs Timer" - end - --> size if (aura_type == "icon") then new_aura.width = icon_size @@ -1342,6 +1399,62 @@ new_aura.fontSize = min (icon_size, 72) end + --> trigger + if (aura_type == "text") then + local init_start = [[ + aura_env.ability_text = "@text" + aura_env.remaining_trigger = @countdown + ]] + + init_start = init_start:gsub ("@text", icon_text) + init_start = init_start:gsub ("@countdown", floor (stacksize)) + new_aura.trigger.remaining = tostring (floor (stacksize)) + + new_aura.actions.init.custom = init_start + + if (other_values.dbm_timer_id) then + new_aura.trigger.event = "DBM Timer" + local timerId = tostring (other_values.dbm_timer_id) + if (timerId:find ("%s")) then + new_aura.trigger.id = "" + new_aura.trigger.use_id = false + new_aura.trigger.spellId_operator = "==" + new_aura.trigger.use_spellId = true + new_aura.trigger.spellId = tostring (other_values.spellid) + else + new_aura.trigger.id = timerId + end + elseif (other_values.bw_timer_id) then + new_aura.trigger.id = "" + new_aura.trigger.use_id = false + new_aura.trigger.spellId_operator = "==" + new_aura.trigger.use_spellId = true + new_aura.trigger.spellId = tostring (other_values.bw_timer_id) + new_aura.trigger.event = "BigWigs Timer" + end + + elseif (aura_type == "aurabar" or aura_type == "icon") then + local trigger = new_aura.additional_triggers[1].trigger + + local init_start = [[ + aura_env.reimaningTime = @countdown + ]] + init_start = init_start:gsub ("@countdown", floor (stacksize)) + new_aura.actions.init.custom = init_start + + if (other_values.dbm_timer_id) then + trigger.event = "DBM Timer" + trigger.spellId = tostring (other_values.spellid) + trigger.remaining = tostring (floor (stacksize)) + + elseif (other_values.bw_timer_id) then + trigger.event = "BigWigs Timer" + trigger.spellId = tostring (other_values.bw_timer_id) + trigger.remaining = tostring (floor (stacksize)) + trigger.spellId_operator = "==" + end + end + else if (aura_type == "icon") then