From 2ff8108c836776a6bb29593c68741241a6c873b6 Mon Sep 17 00:00:00 2001 From: Tercioo Date: Tue, 9 Apr 2019 14:05:18 -0300 Subject: [PATCH] More development on the new API --- .gitignore | 16 ++ Libs/DF/pictureedit.lua | 1 + boot.lua | 9 +- classes/classe_custom.lua | 53 +++++ core/util.lua | 56 ++++- core/windows.lua | 412 ++++++++++++++++++++++++++++++++++++- functions/api2.lua | 58 ++++-- functions/slash.lua | 2 + functions/timedata.lua | 58 +++++- gumps/janela_principal.lua | 82 +++++++- startup.lua | 54 ++++- 11 files changed, 756 insertions(+), 45 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..995a5cf6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,16 @@ + +core/parser - FF.lua +core/parser_original.lua +core/windows - Copy.lua +functions/savedata - Copy.lua +*.psd +Libs/DF/all_addons.blp +Libs/DF/all_addons.tga +Libs/DF/background.blp +Libs/DF/border_1.blp +Libs/DF/border_2.blp +Libs/DF/border_3.blp +Libs/DF/cooltip_background.blp +Libs/DF/feedback_sites.blp +Libs/DF/icons.blp +Libs/DF/mail.blp diff --git a/Libs/DF/pictureedit.lua b/Libs/DF/pictureedit.lua index d06e8acd..2190cbe5 100644 --- a/Libs/DF/pictureedit.lua +++ b/Libs/DF/pictureedit.lua @@ -10,6 +10,7 @@ local _ window:SetPoint ("center", UIParent, "center") window:SetResizable (true) window:SetMovable (true) + window:SetClampedToScreen (true) tinsert (UISpecialFrames, "DetailsFrameworkImageEdit") window:SetFrameStrata ("TOOLTIP") window:SetMaxResize (650, 500) diff --git a/boot.lua b/boot.lua index e88440a4..551f5cf6 100644 --- a/boot.lua +++ b/boot.lua @@ -5,7 +5,7 @@ _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") _detalhes.build_counter = 7053 - _detalhes.alpha_build_counter = 7053 --if this is higher than the regular counter, use it instead + _detalhes.alpha_build_counter = 7084 --if this is higher than the regular counter, use it instead _detalhes.game_version = "v8.1.5" _detalhes.userversion = "v8.1.5." .. _detalhes.build_counter _detalhes.realversion = 138 --core version, this is used to check API version for scripts and plugins (see alias below) @@ -28,12 +28,11 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ -|cFFFFFF00v8.1.5.7053.138 (|cFFFFCC00April 3rd, 2019|r|cFFFFFF00)|r:\n\n -|cFFFFFF00-|r Fixed the 'Event Tracker' not showing all cooldowns and crowdcontrol.\n\n -|cFFFFFF00-|r Added new gradient wallpapers.\n\n +|cFFFFFF00v8.1.5.7084.138 (|cFFFFCC00April 9rd, 2019|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r Replacing the old API with the new, see /details api.\n\n --]] - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v8.1.5.7053.138 (|cFFFFCC00April 3rd, 2019|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed the 'Event Tracker' not showing all cooldowns and crowdcontrol.\n\n|cFFFFFF00-|r Added new gradient wallpapers.\n\n|cFFFFFF00v8.1.5.7042.138 (|cFFFFCC00March 23th, 2019|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added the first batch of functions call for Details API 2.0.\n\n|cFFFFFF00v8.1.0.6923.136 (|cFFFFCC00March 06th, 2019|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed Vamguard plugin not showing debuffs on tanks.\n\n|cFFFFFF00-|r Attempt to fix some plugins loading after details! start and failing to install.\n\n|cFFFFFF00-|r Fixed a bug within Atal'Dazar dungeon where in some cases adds damage where considered friendly fire.\n\n|cFFFFFF00v8.1.0.6902.135 (|cFFFFCC00February 19th, 2019|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed some window gliches with lock, snap and resize buttons.\n\n|cFFFFFF00-|r Fixed issue with the window unlocking after a /reload.\n\n|cFFFFFF00v8.1.0.6861.135 (|cFFFFCC00January 20th, 2019|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed rogue spec icons.\n\n|cFFFFFF00-|r Some visuals improvements.\n\n|cFFFFFF00-|r Added some buttons below the release death recap window, only show in raid after a boss.\n\n|cFFFFFF00v8.1.0.6702.135 (|cFFFFCC00December 31th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Streamers/Youtubers the Event Tracker tool has been fixed for 8.1, enjoy!\n\n|cFFFFFF00v8.0.1.6692.135 (|cFFFFCC00December 11th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed East Asian myriads showing a giganting non formated number in the total bar DPS.\n\n|cFFFFFF00-|r Added a reset nickname button in the right side of the nickname field.\n\n|cFFFFFF00-|r Framework and NickTag library updates.\n\n|cFFFFFF00v8.0.1.6691.135 (|cFFFFCC00November 23th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Experimental: added deaths to overall data during a mythic dungeon run.\n\n|cFFFFFF00-|r Report window revamp: removed report history.\n\n|cFFFFFF00-|r Fixed report tooltip not closing on report button click.\n\n|cFFFFFF00-|r Fixed copy/paste report window.\n\n|cFFFFFF00-|r Time Line (plugin) added enemy cast time line.\n\n|cFFFFFF00v8.0.1.6678.135 (|cFFFFCC00November 07th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r New Feature: import and export profiles.\n\n|cFFFFFF00-|r Major improvements on bar text scripts.\n\n|cFFFFFF00-|r Improved import and export custom skins.\n\n|cFFFFFF00-|r Fixed shaman's sundering spell not showing in crowd control.\n\n|cFFFFFF00-|r Fixed sharing guild statistics.\n\n|cFFFFFF00-|r More spells added to spell consolidation: Whirlwind, Fracture, Mutilate.\n\n|cFFFFFF00-|r Monk Mistweaver Blackout Kick now has a indicator when it comes from passive 'Teachings of the Monastery'.\n\n|cFFFFFF00-|r Added slash command '/details debugwindow' for cases when the window isn't shown or are anchored in the wrong place.\n\n|cFFFFFF00-|r Exposed spell ignore table, you can now add spells to be ignored using Details.SpellsToIgnore [spellID] = true.\n\n|cFFFFFF00v8.0.1.6599.135 (|cFFFFCC00October 19th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed damage on low level training dummies where it was showing 1 damage for each ability.\n\n|cFFFFFF00-|r Added a line in the tooltip shown when hovering over the spec icon to show non-formated DPS, example: '12.0K' DPS shows '11,985.8'.\n\n|cFFFFFF00-|r Developers: command /run Details:DumpTable() should now show the correct table names with quotation marks if string.\n\n|cFFFFFF00v8.0.1.6553.135 (|cFFFFCC00October 06th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a 'Macros' section in the options panel.\n\n|cFFFFFF00-|r Updated to BFA 'Potion Used' and 'Health Potion and Stone' custom displays.\n\n|cFFFFFF00-|r Backfire damage from Light of the Martyr now shows on death logs as friendly fire.\n\n|cFFFFFF00-|r Deprecated rules for friendly fire has been removed, this might fix some random issues with mind controlled players in the Lord Stormsong encounter in the Shrine of the Storm dungeon.\n\n|cFFFFFF00-|r Fixed DBM/BigWigs aura creation from the Spell List panel.\n\n|cFFFFFF00-|r Chart scripts now receives the envTable, use local envTable = ... .\n\n|cFFFFFF00-|r Polymorth (Black Cat) and Between the Eyes got added to Crowd Control list.\n\n|cFFFFFF00-|r Fixed Timeline plugin not showing the cooldown panel.\n\n|cFFFFFF00-|r Overall data setting won't reset on every logout.\n\n|cFFFFFF00-|r Slash command '/details merge' won't flag the merged combat as a trash segment anymore.\n\n|cFFFFFF00-|r Added function to use on macros to open the Player Details Window: /script Details:OpenPlayerDetails(1).\n\n|cFFFFFF00-|r Done more improvements on the Death Recap window.\n\n|cFFFFFF00v8.0.1.6449.134 (|cFFFFCC00September 11th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Details! is ready for Uldir mythic raiding!.\n\n|cFFFFFF00-|r Several improvements on Encounter Details plugin.\n\n|cFFFFFF00-|r Details! Scroll Damage for training in dummies is now ready for more tests, access it |cFFFFFF00/details scrolldamage|r.\n\n|cFFFFFF00-|r Damage and Healing tooltips now show a statusbar indicating the percent done by the ability.\n\n|cFFFFFF00-|r Added a scale slider to the options panel.\n\n|cFFFFFF00-|r Added monk's Quaking Palm to crowd control spells.\n\n|cFFFFFF00-|r Fixed an issue with Plater integration.\n\n|cFFFFFF00-|r Fixed tooltips not hiding when the cursor leaves the spell icon in the Damage Taken by Spell.\n\n|cFFFFFF00-|r Framework: fixed an issue with tooltips and menus where the division line wasn't hiding properly.\n\n|cFFFFFF00-|r Framework: fixed some buttons not showing its text in the options panel.\n\n|cFFFFFF00v8.0.1.6272.134 (|cFFFFCC00August 28th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed Dynamic Overall Data custom display.\n\n|cFFFFFF00-|r Fixed friendly fire on some dungeon fights with mind control.\n\n|cFFFFFF00-|r Raid Check plugin fully revamped, now shows talents, spec and role.\n\n|cFFFFFF00-|r Updated flask and food list for BFA.\n\n|cFFFFFF00-|r Added NpcID listing at the Spell List window.\n\n|cFFFFFF00-|r Fixed an issue with Alliance or Horde icons showing at random in player bars.\n\n|cFFFFFF00-|r Small revamp in the Death Recap window.\n\n|cFFFFFF00-|r Fixed new segment creation when the option to use only one segment while in a battleground is disabled.\n\n|cFFFFFF00-|r Fixed east asian number format on several strings.\n\n|cFFFFFF00-|r 'Smart Score' option renamed to 'Unique Segment' under the PvP options for battlegrounds.\n\n|cFFFFFF00v8.0.1.6120.132 (|cFFFFCC00August 07th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Death Knight: Epidemic, Scourge Strike and Howling Blast now has a better description on the spell name.\n\n|cFFFFFF00-|r Fixed snap button showing when 'Hide Resize Buttons' are enabled.\n\n|cFFFFFF00-|r Fixed title bar icons not hiding when 'Auto Hide Buttons' is enabled.\n\n|cFFFFFF00-|r Several improvements to overall data, it should be more consistent now.\n\n|cFFFFFF00-|r Details! now passes to identify the tank role of the player even when out of a party or raid.\n\n|cFFFFFF00-|r Debug helper /run Details:DumpTable(table) now correctly shows the key name when it isn't a string.\n\n|cFFFFFF00-|r Improvements done on the Bookmark config frame accessed by the options panel > display section.\n\n|cFFFFFF00-|r New slash command: '/details spells'.\n\n|cFFFFFF00-|r Statistics for Legion has been closed! You can access statistics from the orange gear > statistics.\n\n|cFFFFFF00v8.0.1.6027.132 (|cFFFFCC00July 28th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added size offset options for the chat tab embed feature.\n\n|cFFFFFF00-|r Revamp on the editor for the custom line text.\n\n|cFFFFFF00v8.0.1.5985.131 (|cFFFFCC00July 17th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added 'Auto Run Code' module.\n\n|cFFFFFF00-|r Added 'Plater Nameplates' integration.\n\n|cFFFFFF00-|r Weakauras integration with the Create Aura panel got great improvements.\n\n|cFFFFFF00-|r Many options has been renamed or moved from groups for better organization .\n\n|cFFFFFF00-|r Several skins got some revamp for 2018.\n\n|cFFFFFF00-|r Default settings for Arenas and Battlegrounds got changes and the experience should be more smooth now.\n\n|cFFFFFF00v7.3.5.5559.130 (|cFFFFCC00April 13th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added slash commands: /details 'softtoggle' 'softshow' 'softhide'. Use them to manipulate the window visibility while using auto hide.\n\n|cFFFFFF00-|r Mythic dungeon graphic window won't show up if the user leaves the dungeon before completing it.\n\n|cFFFFFF00v7.3.5.5529.130 (|cFFFFCC00April 06th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added minimize button on the mythic dungeon run chart.\n\n|cFFFFFF00-|r Added API calls: Details:ResetSegmentOverallData() and Details:ResetSegmentData().\n\n|cFFFFFF00v7.3.5.5499.130 (|cFFFFCC00Mar 30th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added outline option for the right text.\n\n|cFFFFFF00v7.3.5.5469.130 (|cFFFFCC00Mar 23th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed a few things on the mythic dungeon chart.\n\n|cFFFFFF00v7.3.5.5424.129 (|cFFFFCC00Mar 10th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added macro support to open plugins. Example:\n /run Details:OpenPlugin ('Time Line')\n\n|cFFFFFF00v7.3.5.5351.129 (|cFFFFCC00Feb 26rd, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a damage chart for mythic dungeon runs, it shows at the of the run. You may disable it at the Streamer Settings.\n\n|cFFFFFF00v7.3.5.5231.128 (|cFFFFCC00Feb 02nd, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with wasted shield absorbs where the wasted amount was subtracting the total healing done.\n\n|cFFFFFF00v7.3.5.5221.128 (|cFFFFCC00Jan 26th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Warlock mana from Life Tap won't show up any more under mana regen, this makes easy to see Soul Shard gain.\n\n|cFFFFFF00v7.3.2.5183.128 (|cFFFFCC00Jan 12th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r The new bar animation is now applied to all users by default.\n\n|cFFFFFF00-|r Fixed an issue with the threat plugin where sometimes it was triggering errors.\n\n|cFFFFFF00v7.3.2.5175.128 (|cFFFFCC00Jan 03rd, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r ElvUI skins should have now a more good looking scrollbar.\n\n|cFFFFFF00-|r When starting to edit a custom display, the code window now clear the code from the previous display.\n\n|cFFFFFF00v7.3.2.5154.128 (|cFFFFCC00Dec 22th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r API and Create Aura windows are now attached to the new plugin window.\n\n|cFFFFFF00v7.3.2.5101.128 (|cFFFFCC00Dec 15th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Moving the custom display window to the new plugins window.\n\n|cFFFFFF00-|r Major layout changes on the Encounter Details plugin window.\n\n|cFFFFFF00v7.3.2.4919.128 (|cFFFFCC00Dec 08th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with the statistics sharing among guild members.\n\n|cFFFFFF00-|r Fixed an issue with Argus encounter where two segments were created.\n\n|cFFFFFF00-|r Fixed aura type images on the Create Aura Panel.\n\n|cFFFFFF00-|r Create Aura Panel can now be closed with Right Click.\n\n|cFFFFFF00-|r Framework updated to r60, plugins should be more stable now.\n\n|cFFFFFF00v7.3.0.4830.126 (|cFFFFFF00v7.3.2.4836.126 (|cFFFFCC00Nov 21th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Removed some tutorial windows popups.\n\n|cFFFFCC00Oct 21th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed opening windows when streamer settings > no alerts is enabled.\n\n|cFFFFFF00v7.3.0.4823.126 (|cFFFFCC00Oct 09th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added new options section: Streamer Settings, focused on adjustments for streamers and youtubers.\n\n|cFFFFFF00-|r Animations now always run at the same speed regardless the framerate.\n\n|cFFFFFF00-|r Click-To-Open menus now close the menu if the menu is already open.\n\n|cFFFFFF00v7.3.0.4723.126 (|cFFFFCC00Set 22th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed overall dungeon segments being added to overall data.\n\n|cFFFFFF00v7.3.0.4705.126 (|cFFFFCC00Set 19th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed damage taken tooltip for Brewmaster Monk where sometimes the tooltip didn't open.\n\n|cFFFFFF00-|r Fixed overall data on mythic dungeon not adding trash segments even with the option enabled on the options panel.\n\n|cFFFFFF00-|r Fixed the guild selection dropdown reseting everytime the Guild Rank window is opened.\n\n|cFFFFFF00v7.3.0.4677.126 (|cFFFFCC00Set 10th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r During mythic dungeons, the trash segments will be merged into a new segment at the end of the boss encounter (instead of merging on the fly while cleaning up).\n\n|cFFFFFF00v7.3.0.4615.125 (|cFFFFCC00Set 09th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Setting up the dungeon stuff as opt-in for early adopters while we continue to make improvements on the system.\n\n|cFFFFFF00v7.3.0.4586.125 (|cFFFFCC00Set 08th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Formating mythic+ dungeon segments, each segment should count the boss trash + boss fight.\n\n|cFFFFFF00-|r At the end of the mythic+ dungeon, it should create a new segment adding up all segments described above.\n\n|cFFFFFF00v7.3.0.4499.124 (|cFFFFCC00Set 05th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option to always show all players when using the standard mode. Option under PvP/PvE bracket on the options panel.\n\n|cFFFFFF00-|r Added a setting to exclude healing done lines from the death log below a certain healing amount. This options is also under PvP/PvE bracket.\n\n|cFFFFFF00-|r Fixed the guild selection on the ranking panel.\n\n|cFFFFFF00v7.3.0.4467.124 (|cFFFFCC00August 29th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Damage or Healing record for the encounter should be printed on chat on the boss pull.\nUse /run Details.announce_damagerecord.enabled = false; to disable.\n\n|cFFFFFF00v7.2.5.4437.124 (|cFFFFCC00August 21th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added healing done cap for death log. Use /run Details.deathlog_healingdone_min = 10000\n\n|cFFFFFF00-|r Fixed an issue where the alpha from the fixed bar color was used even when this option was disabled.\n\n|cFFFFFF00v7.2.5.4436.124 (|cFFFFCC00August 17th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Attempt to fix the issue where the window doesn't update after entering a raid or reseting data.\n\n|cFFFFFF00v7.2.5.4434.124 (|cFFFFCC00August 10th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added buttons to create an aura at Aura tab on the Player Details window.\n\n|cFFFFFF00-|r Fixes and improvements on the damage rank panel.\n\n|cFFFFFF00-|r Best damage or healing for the player on the current boss encounter is now shown on the spec icon tooltip.\n\n|cFFFFFF00-|r Major revamp on the aura creation panel.\n\n|cFFFFFF00v7.2.5.4369.124 (|cFFFFCC00August 1st, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Details! can now track debuff applications (stack) and refreshes.\n\n|cFFFFFF00-|r Added new tab on Player Detail Window called 'Auras', you can see your buffs and debuffs from there.\n\n|cFFFFFF00-|r Death log now show debuff applications.\n\n|cFFFFFF00v7.2.5.4275.123 (|cFFFFCC00July 18th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed some issues with tooltiops popup when the user press SHIFT.\n\n|cFFFFFF00-|r Now is possible to change the bar durating when selecting Cast Start trigger on Details! Forge.\n\n|cFFFFFF00-|r Kil'Jaeden adds should be consolidated into only one actor instead of having one for each player targeted.\n\n|cFFFFFF00v7.2.5.4236.122 (|cFFFFCC00July 05th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r The alert to open the raid ranking after a boss kill, is now shown for 10 seconds (down from 40).\n\n|cFFFFFF00-|r Added a report button on the raid ranking panel and boss are sort alphabetically.\n\n|cFFFFFF00-|r Fixed some issues on the combatlog introduced on the wow patch 7.2.5 where sometimes the source of an event has no name.\n\n|cFFFFFF00-|r Ticket #209, fixed more issues with the comparison panel where are pets involved.\n\n|cFFFFFF00v7.2.5.4201.121 (|cFFFFCC00June 26th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed Monk Stagger where it was only shown on the friendly fire and not under the Damage Taken display.\n\n|cFFFFFF00-|r Added Forge and Ranking options on the main menu (orange cogwheel).\n\n|cFFFFFF00v7.2.5.4102.121 (|cFFFFCC00June 22th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Details! Forge has updated and now is more usder friendly.\n\n|cFFFFFF00-|r Fixed an issue with player buff uptime where sometimes some buffs wans't showing in the tooltip.\n\n|cFFFFFF00v7.2.5.3968.120 (|cFFFFCC00June 20th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r New Death Recap implemented! replaces the default from Blizzard and can be configured at Options > Raid Tools.\n\n|cFFFFFF00-|r New Guild Damage and Heal rank on '/details ranking' panel.\n\n|cFFFFFF00-|r Added a Guild Sync button on the Details! Ranking Panel.\n\n|cFFFFFF00-|r Added Custom display 'Damage on Shields', useful for encounter like Maiden of Vigilance where there's big shields to be removed and you want to know who is doing more damage to it.\n\n|cFFFFFF00-|r Added Heal Absorbed display under Heal bracket.\n\nHeal Absorb are the heal denied by abilities such like DK's Necrotic Strike or raid boss Sisters of the Moon 'Embrace of the Eclipse' ability.\nThe tooltip of this display shows which players got heal denied, which abilities absorbed the heal, which abilities tried to heal but got the heal denied.\n\n|cFFFFFF00-|r Added Alternate Power display under Energy bracket, it shows the total of alternate power gain from each player, useful for encounters such as Demonic Inquisition.\n\n|cFFFFFF00-|r 'First Hit' message after pulling a boss, now also shows who the boss is targeting (almost always is who pulled).\n\n|cFFFFFF00-|r Raid Dps {rdps} and Hps {rhps} can now be used on the Broker Data Feed..\n\n|cFFFFFF00-|r Fixed an issue with Chromie from the scenario 'The Deaths of Chromie' where she wasn't being shown on the meter.\n\n|cFFFFFF00-|r Fixed Paladin 'Light of the Martyr' damage to self.\n\n|cFFFFFF00-|r Ticket #198 'Script Error' Fixed.\n\n|cFFFFFF00v7.2.0.3703.119 (|cFFFFCC00May 29th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an error while killing low level mobs with warrior class.\n\n|cFFFFFF00v7.2.0.3693.118 (|cFFFFCC00May 25th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fury Warrior shouldn't be assigned as Protection any more.\n\n|cFFFFFF00-|r Some parser fixes.\n\n|cFFFFFF00v7.2.0.3673.118 (|cFFFFCC00May 09th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Ticket #187: Fixed an issue when comparing hunter pets on the player detail window.\n\n|cFFFFFF00-|r Ticket #189 #186: Fixed a taint issue for some classes when using friendly nameplates on.\n\n|cFFFFFF00v7.2.0.3512.116 (|cFFFFCC00April 27th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Havoc Demon Hunter: your fury energy is being shown under Mana Restored (don't ask me why, the combat log is telling us it's mana).\n\n|cFFFFFF00-|r Pets now are shown on damage tooltips.\n\n|cFFFFFF00-|r Pets are now also shown on the comparison panel.\n\n|cFFFFFF00v7.2.0.3474.116 (|cFFFFCC00April 20th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin: Raid Check > added some food buffs which wasn't being tracked.\n\n|cFFFFFF00v7.2.0.3467.116 (|cFFFFCC00April 07th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for the custom display window where apply and cancel buttons where over the edit window.\n\n|cFFFFFF00-|r Fix for an issue on editing a bookmark.\n\n|cFFFFFF00v7.1.5.3459.116 (|cFFFFCC00Mar 21th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue on dynamic overall data where it wasn't showing DPS.\n\n|cFFFFFF00-|r Fixed an issue with Apply, Save and Cancel buttons when editing a custom display.\n\n|cFFFFFF00-|r Removed the Damage and Healing presets for custom displays, now is only possible create custom displays by scripting them.\n\n|cFFFFFF00v7.1.5.3431.116 (|cFFFFCC00Mar 15th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with bar orientation right to left where fixed bar color isn't working.\n\n|cFFFFFF00-|r The nickname field now use FrizQuadrataTT font and shall be compatible with Cyrillic.\n\n|cFFFFFF00v7.1.5.3418.116 (|cFFFFCC00Mar 1st, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Ticket #167 fix: Light of the Martyr self-damage now does reduce the healing done (following WCL method).\n\n|cFFFFFF00-|r Ticket #169 fix: Damage Prevented is now working for new segments.\n\n|cFFFFFF00-|r Fixed an issue where sometimes BeastMaster's Hati pet wasn't detected correctly.\n\n|cFFFFFF00v7.1.5.3369.116 (|cFFFFCC00Feb 07th, 2017|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, 2017|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." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v8.1.5.7084.138 (|cFFFFCC00April 9rd, 2019|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Replacing the old API with the new, see /details api.\n\n|cFFFFFF00v8.1.5.7053.138 (|cFFFFCC00April 3rd, 2019|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed the 'Event Tracker' not showing all cooldowns and crowdcontrol.\n\n|cFFFFFF00-|r Added new gradient wallpapers.\n\n|cFFFFFF00v8.1.5.7042.138 (|cFFFFCC00March 23th, 2019|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added the first batch of functions call for Details API 2.0.\n\n|cFFFFFF00v8.1.0.6923.136 (|cFFFFCC00March 06th, 2019|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed Vamguard plugin not showing debuffs on tanks.\n\n|cFFFFFF00-|r Attempt to fix some plugins loading after details! start and failing to install.\n\n|cFFFFFF00-|r Fixed a bug within Atal'Dazar dungeon where in some cases adds damage where considered friendly fire.\n\n|cFFFFFF00v8.1.0.6902.135 (|cFFFFCC00February 19th, 2019|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed some window gliches with lock, snap and resize buttons.\n\n|cFFFFFF00-|r Fixed issue with the window unlocking after a /reload.\n\n|cFFFFFF00v8.1.0.6861.135 (|cFFFFCC00January 20th, 2019|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed rogue spec icons.\n\n|cFFFFFF00-|r Some visuals improvements.\n\n|cFFFFFF00-|r Added some buttons below the release death recap window, only show in raid after a boss.\n\n|cFFFFFF00v8.1.0.6702.135 (|cFFFFCC00December 31th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Streamers/Youtubers the Event Tracker tool has been fixed for 8.1, enjoy!\n\n|cFFFFFF00v8.0.1.6692.135 (|cFFFFCC00December 11th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed East Asian myriads showing a giganting non formated number in the total bar DPS.\n\n|cFFFFFF00-|r Added a reset nickname button in the right side of the nickname field.\n\n|cFFFFFF00-|r Framework and NickTag library updates.\n\n|cFFFFFF00v8.0.1.6691.135 (|cFFFFCC00November 23th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Experimental: added deaths to overall data during a mythic dungeon run.\n\n|cFFFFFF00-|r Report window revamp: removed report history.\n\n|cFFFFFF00-|r Fixed report tooltip not closing on report button click.\n\n|cFFFFFF00-|r Fixed copy/paste report window.\n\n|cFFFFFF00-|r Time Line (plugin) added enemy cast time line.\n\n|cFFFFFF00v8.0.1.6678.135 (|cFFFFCC00November 07th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r New Feature: import and export profiles.\n\n|cFFFFFF00-|r Major improvements on bar text scripts.\n\n|cFFFFFF00-|r Improved import and export custom skins.\n\n|cFFFFFF00-|r Fixed shaman's sundering spell not showing in crowd control.\n\n|cFFFFFF00-|r Fixed sharing guild statistics.\n\n|cFFFFFF00-|r More spells added to spell consolidation: Whirlwind, Fracture, Mutilate.\n\n|cFFFFFF00-|r Monk Mistweaver Blackout Kick now has a indicator when it comes from passive 'Teachings of the Monastery'.\n\n|cFFFFFF00-|r Added slash command '/details debugwindow' for cases when the window isn't shown or are anchored in the wrong place.\n\n|cFFFFFF00-|r Exposed spell ignore table, you can now add spells to be ignored using Details.SpellsToIgnore [spellID] = true.\n\n|cFFFFFF00v8.0.1.6599.135 (|cFFFFCC00October 19th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed damage on low level training dummies where it was showing 1 damage for each ability.\n\n|cFFFFFF00-|r Added a line in the tooltip shown when hovering over the spec icon to show non-formated DPS, example: '12.0K' DPS shows '11,985.8'.\n\n|cFFFFFF00-|r Developers: command /run Details:DumpTable() should now show the correct table names with quotation marks if string.\n\n|cFFFFFF00v8.0.1.6553.135 (|cFFFFCC00October 06th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a 'Macros' section in the options panel.\n\n|cFFFFFF00-|r Updated to BFA 'Potion Used' and 'Health Potion and Stone' custom displays.\n\n|cFFFFFF00-|r Backfire damage from Light of the Martyr now shows on death logs as friendly fire.\n\n|cFFFFFF00-|r Deprecated rules for friendly fire has been removed, this might fix some random issues with mind controlled players in the Lord Stormsong encounter in the Shrine of the Storm dungeon.\n\n|cFFFFFF00-|r Fixed DBM/BigWigs aura creation from the Spell List panel.\n\n|cFFFFFF00-|r Chart scripts now receives the envTable, use local envTable = ... .\n\n|cFFFFFF00-|r Polymorth (Black Cat) and Between the Eyes got added to Crowd Control list.\n\n|cFFFFFF00-|r Fixed Timeline plugin not showing the cooldown panel.\n\n|cFFFFFF00-|r Overall data setting won't reset on every logout.\n\n|cFFFFFF00-|r Slash command '/details merge' won't flag the merged combat as a trash segment anymore.\n\n|cFFFFFF00-|r Added function to use on macros to open the Player Details Window: /script Details:OpenPlayerDetails(1).\n\n|cFFFFFF00-|r Done more improvements on the Death Recap window.\n\n|cFFFFFF00v8.0.1.6449.134 (|cFFFFCC00September 11th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Details! is ready for Uldir mythic raiding!.\n\n|cFFFFFF00-|r Several improvements on Encounter Details plugin.\n\n|cFFFFFF00-|r Details! Scroll Damage for training in dummies is now ready for more tests, access it |cFFFFFF00/details scrolldamage|r.\n\n|cFFFFFF00-|r Damage and Healing tooltips now show a statusbar indicating the percent done by the ability.\n\n|cFFFFFF00-|r Added a scale slider to the options panel.\n\n|cFFFFFF00-|r Added monk's Quaking Palm to crowd control spells.\n\n|cFFFFFF00-|r Fixed an issue with Plater integration.\n\n|cFFFFFF00-|r Fixed tooltips not hiding when the cursor leaves the spell icon in the Damage Taken by Spell.\n\n|cFFFFFF00-|r Framework: fixed an issue with tooltips and menus where the division line wasn't hiding properly.\n\n|cFFFFFF00-|r Framework: fixed some buttons not showing its text in the options panel.\n\n|cFFFFFF00v8.0.1.6272.134 (|cFFFFCC00August 28th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed Dynamic Overall Data custom display.\n\n|cFFFFFF00-|r Fixed friendly fire on some dungeon fights with mind control.\n\n|cFFFFFF00-|r Raid Check plugin fully revamped, now shows talents, spec and role.\n\n|cFFFFFF00-|r Updated flask and food list for BFA.\n\n|cFFFFFF00-|r Added NpcID listing at the Spell List window.\n\n|cFFFFFF00-|r Fixed an issue with Alliance or Horde icons showing at random in player bars.\n\n|cFFFFFF00-|r Small revamp in the Death Recap window.\n\n|cFFFFFF00-|r Fixed new segment creation when the option to use only one segment while in a battleground is disabled.\n\n|cFFFFFF00-|r Fixed east asian number format on several strings.\n\n|cFFFFFF00-|r 'Smart Score' option renamed to 'Unique Segment' under the PvP options for battlegrounds.\n\n|cFFFFFF00v8.0.1.6120.132 (|cFFFFCC00August 07th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Death Knight: Epidemic, Scourge Strike and Howling Blast now has a better description on the spell name.\n\n|cFFFFFF00-|r Fixed snap button showing when 'Hide Resize Buttons' are enabled.\n\n|cFFFFFF00-|r Fixed title bar icons not hiding when 'Auto Hide Buttons' is enabled.\n\n|cFFFFFF00-|r Several improvements to overall data, it should be more consistent now.\n\n|cFFFFFF00-|r Details! now passes to identify the tank role of the player even when out of a party or raid.\n\n|cFFFFFF00-|r Debug helper /run Details:DumpTable(table) now correctly shows the key name when it isn't a string.\n\n|cFFFFFF00-|r Improvements done on the Bookmark config frame accessed by the options panel > display section.\n\n|cFFFFFF00-|r New slash command: '/details spells'.\n\n|cFFFFFF00-|r Statistics for Legion has been closed! You can access statistics from the orange gear > statistics.\n\n|cFFFFFF00v8.0.1.6027.132 (|cFFFFCC00July 28th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added size offset options for the chat tab embed feature.\n\n|cFFFFFF00-|r Revamp on the editor for the custom line text.\n\n|cFFFFFF00v8.0.1.5985.131 (|cFFFFCC00July 17th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added 'Auto Run Code' module.\n\n|cFFFFFF00-|r Added 'Plater Nameplates' integration.\n\n|cFFFFFF00-|r Weakauras integration with the Create Aura panel got great improvements.\n\n|cFFFFFF00-|r Many options has been renamed or moved from groups for better organization .\n\n|cFFFFFF00-|r Several skins got some revamp for 2018.\n\n|cFFFFFF00-|r Default settings for Arenas and Battlegrounds got changes and the experience should be more smooth now.\n\n|cFFFFFF00v7.3.5.5559.130 (|cFFFFCC00April 13th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added slash commands: /details 'softtoggle' 'softshow' 'softhide'. Use them to manipulate the window visibility while using auto hide.\n\n|cFFFFFF00-|r Mythic dungeon graphic window won't show up if the user leaves the dungeon before completing it.\n\n|cFFFFFF00v7.3.5.5529.130 (|cFFFFCC00April 06th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added minimize button on the mythic dungeon run chart.\n\n|cFFFFFF00-|r Added API calls: Details:ResetSegmentOverallData() and Details:ResetSegmentData().\n\n|cFFFFFF00v7.3.5.5499.130 (|cFFFFCC00Mar 30th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added outline option for the right text.\n\n|cFFFFFF00v7.3.5.5469.130 (|cFFFFCC00Mar 23th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed a few things on the mythic dungeon chart.\n\n|cFFFFFF00v7.3.5.5424.129 (|cFFFFCC00Mar 10th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added macro support to open plugins. Example:\n /run Details:OpenPlugin ('Time Line')\n\n|cFFFFFF00v7.3.5.5351.129 (|cFFFFCC00Feb 26rd, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a damage chart for mythic dungeon runs, it shows at the of the run. You may disable it at the Streamer Settings.\n\n|cFFFFFF00v7.3.5.5231.128 (|cFFFFCC00Feb 02nd, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with wasted shield absorbs where the wasted amount was subtracting the total healing done.\n\n|cFFFFFF00v7.3.5.5221.128 (|cFFFFCC00Jan 26th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Warlock mana from Life Tap won't show up any more under mana regen, this makes easy to see Soul Shard gain.\n\n|cFFFFFF00v7.3.2.5183.128 (|cFFFFCC00Jan 12th, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r The new bar animation is now applied to all users by default.\n\n|cFFFFFF00-|r Fixed an issue with the threat plugin where sometimes it was triggering errors.\n\n|cFFFFFF00v7.3.2.5175.128 (|cFFFFCC00Jan 03rd, 2018|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r ElvUI skins should have now a more good looking scrollbar.\n\n|cFFFFFF00-|r When starting to edit a custom display, the code window now clear the code from the previous display.\n\n|cFFFFFF00v7.3.2.5154.128 (|cFFFFCC00Dec 22th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r API and Create Aura windows are now attached to the new plugin window.\n\n|cFFFFFF00v7.3.2.5101.128 (|cFFFFCC00Dec 15th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Moving the custom display window to the new plugins window.\n\n|cFFFFFF00-|r Major layout changes on the Encounter Details plugin window.\n\n|cFFFFFF00v7.3.2.4919.128 (|cFFFFCC00Dec 08th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with the statistics sharing among guild members.\n\n|cFFFFFF00-|r Fixed an issue with Argus encounter where two segments were created.\n\n|cFFFFFF00-|r Fixed aura type images on the Create Aura Panel.\n\n|cFFFFFF00-|r Create Aura Panel can now be closed with Right Click.\n\n|cFFFFFF00-|r Framework updated to r60, plugins should be more stable now.\n\n|cFFFFFF00v7.3.0.4830.126 (|cFFFFFF00v7.3.2.4836.126 (|cFFFFCC00Nov 21th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Removed some tutorial windows popups.\n\n|cFFFFCC00Oct 21th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed opening windows when streamer settings > no alerts is enabled.\n\n|cFFFFFF00v7.3.0.4823.126 (|cFFFFCC00Oct 09th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added new options section: Streamer Settings, focused on adjustments for streamers and youtubers.\n\n|cFFFFFF00-|r Animations now always run at the same speed regardless the framerate.\n\n|cFFFFFF00-|r Click-To-Open menus now close the menu if the menu is already open.\n\n|cFFFFFF00v7.3.0.4723.126 (|cFFFFCC00Set 22th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed overall dungeon segments being added to overall data.\n\n|cFFFFFF00v7.3.0.4705.126 (|cFFFFCC00Set 19th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed damage taken tooltip for Brewmaster Monk where sometimes the tooltip didn't open.\n\n|cFFFFFF00-|r Fixed overall data on mythic dungeon not adding trash segments even with the option enabled on the options panel.\n\n|cFFFFFF00-|r Fixed the guild selection dropdown reseting everytime the Guild Rank window is opened.\n\n|cFFFFFF00v7.3.0.4677.126 (|cFFFFCC00Set 10th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r During mythic dungeons, the trash segments will be merged into a new segment at the end of the boss encounter (instead of merging on the fly while cleaning up).\n\n|cFFFFFF00v7.3.0.4615.125 (|cFFFFCC00Set 09th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Setting up the dungeon stuff as opt-in for early adopters while we continue to make improvements on the system.\n\n|cFFFFFF00v7.3.0.4586.125 (|cFFFFCC00Set 08th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Formating mythic+ dungeon segments, each segment should count the boss trash + boss fight.\n\n|cFFFFFF00-|r At the end of the mythic+ dungeon, it should create a new segment adding up all segments described above.\n\n|cFFFFFF00v7.3.0.4499.124 (|cFFFFCC00Set 05th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option to always show all players when using the standard mode. Option under PvP/PvE bracket on the options panel.\n\n|cFFFFFF00-|r Added a setting to exclude healing done lines from the death log below a certain healing amount. This options is also under PvP/PvE bracket.\n\n|cFFFFFF00-|r Fixed the guild selection on the ranking panel.\n\n|cFFFFFF00v7.3.0.4467.124 (|cFFFFCC00August 29th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Damage or Healing record for the encounter should be printed on chat on the boss pull.\nUse /run Details.announce_damagerecord.enabled = false; to disable.\n\n|cFFFFFF00v7.2.5.4437.124 (|cFFFFCC00August 21th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added healing done cap for death log. Use /run Details.deathlog_healingdone_min = 10000\n\n|cFFFFFF00-|r Fixed an issue where the alpha from the fixed bar color was used even when this option was disabled.\n\n|cFFFFFF00v7.2.5.4436.124 (|cFFFFCC00August 17th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Attempt to fix the issue where the window doesn't update after entering a raid or reseting data.\n\n|cFFFFFF00v7.2.5.4434.124 (|cFFFFCC00August 10th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added buttons to create an aura at Aura tab on the Player Details window.\n\n|cFFFFFF00-|r Fixes and improvements on the damage rank panel.\n\n|cFFFFFF00-|r Best damage or healing for the player on the current boss encounter is now shown on the spec icon tooltip.\n\n|cFFFFFF00-|r Major revamp on the aura creation panel.\n\n|cFFFFFF00v7.2.5.4369.124 (|cFFFFCC00August 1st, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Details! can now track debuff applications (stack) and refreshes.\n\n|cFFFFFF00-|r Added new tab on Player Detail Window called 'Auras', you can see your buffs and debuffs from there.\n\n|cFFFFFF00-|r Death log now show debuff applications.\n\n|cFFFFFF00v7.2.5.4275.123 (|cFFFFCC00July 18th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed some issues with tooltiops popup when the user press SHIFT.\n\n|cFFFFFF00-|r Now is possible to change the bar durating when selecting Cast Start trigger on Details! Forge.\n\n|cFFFFFF00-|r Kil'Jaeden adds should be consolidated into only one actor instead of having one for each player targeted.\n\n|cFFFFFF00v7.2.5.4236.122 (|cFFFFCC00July 05th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r The alert to open the raid ranking after a boss kill, is now shown for 10 seconds (down from 40).\n\n|cFFFFFF00-|r Added a report button on the raid ranking panel and boss are sort alphabetically.\n\n|cFFFFFF00-|r Fixed some issues on the combatlog introduced on the wow patch 7.2.5 where sometimes the source of an event has no name.\n\n|cFFFFFF00-|r Ticket #209, fixed more issues with the comparison panel where are pets involved.\n\n|cFFFFFF00v7.2.5.4201.121 (|cFFFFCC00June 26th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed Monk Stagger where it was only shown on the friendly fire and not under the Damage Taken display.\n\n|cFFFFFF00-|r Added Forge and Ranking options on the main menu (orange cogwheel).\n\n|cFFFFFF00v7.2.5.4102.121 (|cFFFFCC00June 22th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Details! Forge has updated and now is more usder friendly.\n\n|cFFFFFF00-|r Fixed an issue with player buff uptime where sometimes some buffs wans't showing in the tooltip.\n\n|cFFFFFF00v7.2.5.3968.120 (|cFFFFCC00June 20th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r New Death Recap implemented! replaces the default from Blizzard and can be configured at Options > Raid Tools.\n\n|cFFFFFF00-|r New Guild Damage and Heal rank on '/details ranking' panel.\n\n|cFFFFFF00-|r Added a Guild Sync button on the Details! Ranking Panel.\n\n|cFFFFFF00-|r Added Custom display 'Damage on Shields', useful for encounter like Maiden of Vigilance where there's big shields to be removed and you want to know who is doing more damage to it.\n\n|cFFFFFF00-|r Added Heal Absorbed display under Heal bracket.\n\nHeal Absorb are the heal denied by abilities such like DK's Necrotic Strike or raid boss Sisters of the Moon 'Embrace of the Eclipse' ability.\nThe tooltip of this display shows which players got heal denied, which abilities absorbed the heal, which abilities tried to heal but got the heal denied.\n\n|cFFFFFF00-|r Added Alternate Power display under Energy bracket, it shows the total of alternate power gain from each player, useful for encounters such as Demonic Inquisition.\n\n|cFFFFFF00-|r 'First Hit' message after pulling a boss, now also shows who the boss is targeting (almost always is who pulled).\n\n|cFFFFFF00-|r Raid Dps {rdps} and Hps {rhps} can now be used on the Broker Data Feed..\n\n|cFFFFFF00-|r Fixed an issue with Chromie from the scenario 'The Deaths of Chromie' where she wasn't being shown on the meter.\n\n|cFFFFFF00-|r Fixed Paladin 'Light of the Martyr' damage to self.\n\n|cFFFFFF00-|r Ticket #198 'Script Error' Fixed.\n\n|cFFFFFF00v7.2.0.3703.119 (|cFFFFCC00May 29th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an error while killing low level mobs with warrior class.\n\n|cFFFFFF00v7.2.0.3693.118 (|cFFFFCC00May 25th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fury Warrior shouldn't be assigned as Protection any more.\n\n|cFFFFFF00-|r Some parser fixes.\n\n|cFFFFFF00v7.2.0.3673.118 (|cFFFFCC00May 09th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Ticket #187: Fixed an issue when comparing hunter pets on the player detail window.\n\n|cFFFFFF00-|r Ticket #189 #186: Fixed a taint issue for some classes when using friendly nameplates on.\n\n|cFFFFFF00v7.2.0.3512.116 (|cFFFFCC00April 27th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Havoc Demon Hunter: your fury energy is being shown under Mana Restored (don't ask me why, the combat log is telling us it's mana).\n\n|cFFFFFF00-|r Pets now are shown on damage tooltips.\n\n|cFFFFFF00-|r Pets are now also shown on the comparison panel.\n\n|cFFFFFF00v7.2.0.3474.116 (|cFFFFCC00April 20th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin: Raid Check > added some food buffs which wasn't being tracked.\n\n|cFFFFFF00v7.2.0.3467.116 (|cFFFFCC00April 07th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for the custom display window where apply and cancel buttons where over the edit window.\n\n|cFFFFFF00-|r Fix for an issue on editing a bookmark.\n\n|cFFFFFF00v7.1.5.3459.116 (|cFFFFCC00Mar 21th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue on dynamic overall data where it wasn't showing DPS.\n\n|cFFFFFF00-|r Fixed an issue with Apply, Save and Cancel buttons when editing a custom display.\n\n|cFFFFFF00-|r Removed the Damage and Healing presets for custom displays, now is only possible create custom displays by scripting them.\n\n|cFFFFFF00v7.1.5.3431.116 (|cFFFFCC00Mar 15th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with bar orientation right to left where fixed bar color isn't working.\n\n|cFFFFFF00-|r The nickname field now use FrizQuadrataTT font and shall be compatible with Cyrillic.\n\n|cFFFFFF00v7.1.5.3418.116 (|cFFFFCC00Mar 1st, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Ticket #167 fix: Light of the Martyr self-damage now does reduce the healing done (following WCL method).\n\n|cFFFFFF00-|r Ticket #169 fix: Damage Prevented is now working for new segments.\n\n|cFFFFFF00-|r Fixed an issue where sometimes BeastMaster's Hati pet wasn't detected correctly.\n\n|cFFFFFF00v7.1.5.3369.116 (|cFFFFCC00Feb 07th, 2017|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, 2017|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." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/classes/classe_custom.lua b/classes/classe_custom.lua index 3890c58a..46995bf0 100644 --- a/classes/classe_custom.lua +++ b/classes/classe_custom.lua @@ -63,6 +63,55 @@ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> core + --from weakauras, list of functions to block on scripts + --source https://github.com/WeakAuras/WeakAuras2/blob/520951a4b49b64cb49d88c1a8542d02bbcdbe412/WeakAuras/AuraEnvironment.lua#L66 + local blockedFunctions = { + -- Lua functions that may allow breaking out of the environment + getfenv = true, + getfenv = true, + loadstring = true, + pcall = true, + xpcall = true, + getglobal = true, + + -- blocked WoW API + SendMail = true, + SetTradeMoney = true, + AddTradeMoney = true, + PickupTradeMoney = true, + PickupPlayerMoney = true, + TradeFrame = true, + MailFrame = true, + EnumerateFrames = true, + RunScript = true, + AcceptTrade = true, + SetSendMailMoney = true, + EditMacro = true, + SlashCmdList = true, + DevTools_DumpCommand = true, + hash_SlashCmdList = true, + CreateMacro = true, + SetBindingMacro = true, + GuildDisband = true, + GuildUninvite = true, + securecall = true, + + --additional + setmetatable = true, + } + + local functionFilter = setmetatable ({}, {__index = function (env, key) + if (key == "_G") then + return env + + elseif (blockedFunctions [key]) then + return nil + + else + return _G [key] + end + end}) + function atributo_custom:GetCombatContainerIndex (attribute) return combat_containers [attribute] end @@ -113,6 +162,7 @@ local errortext func, errortext = loadstring (custom_object.script) if (func) then + setfenv (func, functionFilter) _detalhes.custom_function_cache [instance.customName] = func else _detalhes:Msg ("|cFFFF9900error compiling code for custom display " .. (instance.customName or "") .. " |r:", errortext) @@ -121,6 +171,7 @@ if (custom_object.tooltip) then local tooltip_script, errortext = loadstring (custom_object.tooltip) if (tooltip_script) then + setfenv (tooltip_script, functionFilter) _detalhes.custom_function_cache [instance.customName .. "Tooltip"] = tooltip_script else _detalhes:Msg ("|cFFFF9900error compiling tooltip code for custom display " .. (instance.customName or "") .. " |r:", errortext) @@ -130,6 +181,7 @@ if (custom_object.total_script) then local total_script, errortext = loadstring (custom_object.total_script) if (total_script) then + setfenv (total_script, functionFilter) _detalhes.custom_function_cache [instance.customName .. "Total"] = total_script else _detalhes:Msg ("|cFFFF9900error compiling total code for custom display " .. (instance.customName or "") .. " |r:", errortext) @@ -139,6 +191,7 @@ if (custom_object.percent_script) then local percent_script, errortext = loadstring (custom_object.percent_script) if (percent_script) then + setfenv (percent_script, functionFilter) _detalhes.custom_function_cache [instance.customName .. "Percent"] = percent_script else _detalhes:Msg ("|cFFFF9900error compiling percent code for custom display " .. (instance.customName or "") .. " |r:", errortext) diff --git a/core/util.lua b/core/util.lua index e8d765a9..89517360 100644 --- a/core/util.lua +++ b/core/util.lua @@ -462,6 +462,55 @@ --------end of ToK functions---- + --from weakauras, list of functions to block on scripts + --source https://github.com/WeakAuras/WeakAuras2/blob/520951a4b49b64cb49d88c1a8542d02bbcdbe412/WeakAuras/AuraEnvironment.lua#L66 + local blockedFunctions = { + -- Lua functions that may allow breaking out of the environment + getfenv = true, + getfenv = true, + loadstring = true, + pcall = true, + xpcall = true, + getglobal = true, + + -- blocked WoW API + SendMail = true, + SetTradeMoney = true, + AddTradeMoney = true, + PickupTradeMoney = true, + PickupPlayerMoney = true, + TradeFrame = true, + MailFrame = true, + EnumerateFrames = true, + RunScript = true, + AcceptTrade = true, + SetSendMailMoney = true, + EditMacro = true, + SlashCmdList = true, + DevTools_DumpCommand = true, + hash_SlashCmdList = true, + CreateMacro = true, + SetBindingMacro = true, + GuildDisband = true, + GuildUninvite = true, + securecall = true, + + --additional + setmetatable = true, + } + + local functionFilter = setmetatable ({}, {__index = function (env, key) + if (key == "_G") then + return env + + elseif (blockedFunctions [key]) then + return nil + + else + return _G [key] + end + end}) + --> replacing data for custom texts _detalhes.string = {} @@ -474,9 +523,14 @@ end local run_function = function (str) --> cache functions - local func = function_cache [str] + local func, errortext = function_cache [str] if (not func) then func = loadstring (str) + if (not func) then + _detalhes:Msg ("|cFFFF9900error compiling script on custom text|r: ", errortext) + return 0 + end + setfenv (func, functionFilter) function_cache [str] = func end diff --git a/core/windows.lua b/core/windows.lua index 00f79346..42e12e2a 100644 --- a/core/windows.lua +++ b/core/windows.lua @@ -4641,11 +4641,62 @@ cancel_script_button:SetPoint ("topleft", code_editor, "bottomleft", 0, button_y) --> create run now button + + --from weakauras, list of functions to block on scripts + --source https://github.com/WeakAuras/WeakAuras2/blob/520951a4b49b64cb49d88c1a8542d02bbcdbe412/WeakAuras/AuraEnvironment.lua#L66 + local blockedFunctions = { + -- Lua functions that may allow breaking out of the environment + getfenv = true, + getfenv = true, + loadstring = true, + pcall = true, + xpcall = true, + getglobal = true, + + -- blocked WoW API + SendMail = true, + SetTradeMoney = true, + AddTradeMoney = true, + PickupTradeMoney = true, + PickupPlayerMoney = true, + TradeFrame = true, + MailFrame = true, + EnumerateFrames = true, + RunScript = true, + AcceptTrade = true, + SetSendMailMoney = true, + EditMacro = true, + SlashCmdList = true, + DevTools_DumpCommand = true, + hash_SlashCmdList = true, + CreateMacro = true, + SetBindingMacro = true, + GuildDisband = true, + GuildUninvite = true, + securecall = true, + + --additional + setmetatable = true, + } + + local functionFilter = setmetatable ({}, {__index = function (env, key) + if (key == "_G") then + return env + + elseif (blockedFunctions [key]) then + return nil + + else + return _G [key] + end + end}) + local execute_script = function() local script = code_editor:GetText() local func, errortext = loadstring (script, "Q") if (func) then + setfenv (func, functionFilter) gump:QuickDispatch (func) else errortext_frame:Flash (0.2, 0.2, 0.4, true, nil, nil, "NONE") @@ -4673,21 +4724,24 @@ -- ~API function _detalhes:InitializeAPIWindow() - local DetailsAPIPanel = gump:CreateSimplePanel (UIParent, 700, 480, "Details! API", "DetailsAPIPanel") - DetailsAPIPanel.Frame = DetailsAPIPanel - DetailsAPIPanel.__name = "API" - DetailsAPIPanel.real_name = "DETAILS_APIWINDOW" - DetailsAPIPanel.__icon = [[Interface\AddOns\Details\images\icons]] - DetailsAPIPanel.__iconcoords = {449/512, 480/512, 62/512, 83/512} - DetailsAPIPanel.__iconcolor = "DETAILS_API_ICON" - DetailsPluginContainerWindow.EmbedPlugin (DetailsAPIPanel, DetailsAPIPanel, true) + local DetailsAPI2Frame = gump:CreateSimplePanel (UIParent, 700, 480, "Details! API", "DetailsAPI2Frame") + DetailsAPI2Frame.Frame = DetailsAPI2Frame + DetailsAPI2Frame.__name = "API" + DetailsAPI2Frame.real_name = "DETAILS_APIWINDOW" + DetailsAPI2Frame.__icon = [[Interface\AddOns\Details\images\icons]] + DetailsAPI2Frame.__iconcoords = {449/512, 480/512, 62/512, 83/512} + DetailsAPI2Frame.__iconcolor = "DETAILS_API_ICON" + DetailsPluginContainerWindow.EmbedPlugin (DetailsAPI2Frame, DetailsAPI2Frame, true) - function DetailsAPIPanel.RefreshWindow() + function DetailsAPI2Frame.RefreshWindow() _detalhes.OpenAPI() end end function _detalhes.OpenAPI() + + + --[=[ if (not DetailsAPIPanel or not DetailsAPIPanel.Initialized) then local f = DetailsAPIPanel or gump:CreateSimplePanel (UIParent, 700, 480, "Details! API", "DetailsAPIPanel") @@ -4742,6 +4796,333 @@ --DetailsAPIPanel:Show() DetailsPluginContainerWindow.OpenPlugin (DetailsAPIPanel) + + --]=] + + if (not DetailsAPI2Frame or not DetailsAPI2Frame.Initialized) then + + --menu settings + + DetailsAPI2Frame.Initialized = true + + local panelWidth = 800 + local panelHeight = 610 + local scrollWidth = 200 + local scrollHeight = 570 + local lineHeight = 20 + local lineAmount = 20 + local backdropColor = {.2, .2, .2, 0.2} + local backdropColorOnEnter = {.8, .8, .8, 0.4} + local backdropColorSelected = {1, 1, .8, 0.4} + local yStart = -30 + local xAnchorPoint = 250 + local parametersAmount = 10 + local returnAmount = 10 + + --local Api2Frame = DetailsFramework:CreateSimplePanel (UIParent, panelWidth, panelHeight, "Details! API 2.0", "DetailsAPI2Frame") + local Api2Frame = DetailsAPI2Frame + + Api2Frame:SetFrameStrata ("FULLSCREEN") + Api2Frame:SetPoint ("center") + DetailsFramework:ApplyStandardBackdrop (Api2Frame, false, 1.2) + + --store + local apiFunctionNames = {} + local parametersLines = {} + local returnLines = {} + local currentSelected = 1 + + --on select api on the menu + local onSelectAPI = function (self) + local apiName = apiFunctionNames [self.index] + if (not apiName) then + Details:Msg ("API name not found:", apiName) + return + end + + --fill the box in the right with information about the API + local apiInfo = Details.API_Description [self.index] + if (not apiInfo) then + Details:Msg ("API information for api not found", apiName) + return + end + + currentSelected = self.index + + --update name and desc + Api2Frame.ApiFunctionName.text = apiName + Api2Frame.ApiFunctionDesc.text = apiInfo.desc + + --update the copy line text box + local parameters = "" + for parameterIndex, parameterInfo in ipairs (apiInfo.parameters) do + if (parameterInfo.required) then + parameters = parameters .. parameterInfo.name .. ", " + end + end + parameters = parameters:gsub (", $", "") + + local returnValues = "local " + for returnIndex, returnInfo in ipairs (apiInfo.returnValues) do + returnValues = returnValues .. returnInfo.name .. ", " + end + returnValues = returnValues:gsub (", $", "") + returnValues = returnValues .. " = " + + if (parameters ~= "") then + Api2Frame.ApiCopy.text = returnValues .. apiName .. "( " .. parameters .. " )" + else + Api2Frame.ApiCopy.text = returnValues .. apiName .. "()" + end + + Api2Frame.ApiCopy:SetFocus (true) + Api2Frame.ApiCopy:HighlightText() + + --parameters + for i = 1, #parametersLines do + local parameterLine = parametersLines [i] + local parameterInfo = apiInfo.parameters [i] + + if (parameterInfo) then + parameterLine:Show() + parameterLine.index = i + parameterLine.name.text = parameterInfo.name + parameterLine.typeData.text = parameterInfo.type + parameterLine.required.text = parameterInfo.required and "yes" or "no" + parameterLine.default.text = parameterInfo.default or "" + else + parameterLine:Hide() + end + end + + --return values + for i = 1, #returnLines do + local returnLine = returnLines [i] + local returnInfo = apiInfo.returnValues [i] + + if (returnInfo) then + returnLine:Show() + returnLine.index = i + returnLine.name.text = returnInfo.name + returnLine.typeData.text = returnInfo.type + returnLine.desc.text = returnInfo.desc + + else + returnLine:Hide() + end + end + + --refresh the scroll box + Api2Frame.scrollMenu:Refresh() + end + + --menu scroll + local apiMenuScrollRefresh = function (self, data, offset, total_lines) + for i = 1, total_lines do + local index = i + offset + local apiName = data [index] + if (apiName) then + local line = self:GetLine (i) + line.text:SetText (apiName) + line.index = index + + if (currentSelected == index) then + line:SetBackdropColor (unpack (backdropColorSelected)) + else + line:SetBackdropColor (unpack (backdropColor)) + end + end + end + end + + for apiIndex, apiDesc in ipairs (Details.API_Description) do + tinsert (apiFunctionNames, apiDesc.name) + end + + local api2ScrollMenu = DetailsFramework:CreateScrollBox (Api2Frame, "$parentApi2MenuScroll", apiMenuScrollRefresh, apiFunctionNames, scrollWidth, scrollHeight, lineAmount, lineHeight) + DetailsFramework:ReskinSlider (api2ScrollMenu) + api2ScrollMenu:SetPoint ("topleft", Api2Frame, "topleft", 10, yStart) + Api2Frame.scrollMenu = api2ScrollMenu + + local lineOnEnter = function (self) + self:SetBackdropColor (unpack (backdropColorOnEnter)) + end + + local lineOnLeave = function (self) + if (currentSelected == self.index) then + self:SetBackdropColor (unpack (backdropColorSelected)) + else + self:SetBackdropColor (unpack (backdropColor)) + end + end + + --create lines + for i = 1, lineAmount do + api2ScrollMenu:CreateLine (function (self, index) + local line = CreateFrame ("button", "$parentLine" .. index, self) + line:SetPoint ("topleft", self, "topleft", 1, -((index-1)*(lineHeight+1)) - 1) + line:SetSize (scrollWidth - 2, lineHeight) + line.index = index + + line:SetScript ("OnEnter", lineOnEnter) + line:SetScript ("OnLeave", lineOnLeave) + + line:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}) + line:SetBackdropColor (unpack (backdropColor)) + + line.text = DetailsFramework:CreateLabel (line) + line.text:SetPoint ("left", line, "left", 2, 0) + + line:SetScript ("OnMouseDown", onSelectAPI) + + return line + end) + end + + --info box + local infoWidth = panelWidth - xAnchorPoint - 10 + --api name + Api2Frame.ApiFunctionName = DetailsFramework:CreateLabel (Api2Frame, "", 14, "orange") + Api2Frame.ApiFunctionName:SetPoint ("topleft", Api2Frame, "topleft", xAnchorPoint, yStart) + --api desc + Api2Frame.ApiFunctionDesc = DetailsFramework:CreateLabel (Api2Frame) + Api2Frame.ApiFunctionDesc:SetPoint ("topleft", Api2Frame.ApiFunctionName, "bottomleft", 0, -2) + --api func to copy + local apiCopyString = DetailsFramework:CreateLabel (Api2Frame, "Copy String", 12, "orange") + apiCopyString:SetPoint ("topleft", Api2Frame.ApiFunctionDesc, "bottomleft", 0, -20) + Api2Frame.ApiCopy = DetailsFramework:CreateTextEntry (Api2Frame, function() end, infoWidth, 20) + Api2Frame.ApiCopy:SetPoint ("topleft", apiCopyString, "bottomleft", 0, -2) + Api2Frame.ApiCopy:SetTemplate (DetailsFramework:GetTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX")) + + --parameters + local parametersYStart = yStart - 100 + local parametersString = DetailsFramework:CreateLabel (Api2Frame, "Parameters", 12, "orange") + parametersString:SetPoint ("topleft", Api2Frame, "topleft", xAnchorPoint, parametersYStart) + + parametersYStart = parametersYStart - 20 + + local space1, space2, space3 = 100, 200, 300 + local parametersHeader = CreateFrame ("frame", nil, Api2Frame) + parametersHeader:SetSize (infoWidth, 20) + parametersHeader:SetPoint ("topleft", Api2Frame, "topleft", xAnchorPoint, parametersYStart) + parametersHeader:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}) + parametersHeader:SetBackdropColor (unpack (backdropColor)) + parametersHeader.name = DetailsFramework:CreateLabel (parametersHeader, "Name", 12, "yellow") + parametersHeader.typeData = DetailsFramework:CreateLabel (parametersHeader, "Type", 12, "yellow") + parametersHeader.required = DetailsFramework:CreateLabel (parametersHeader, "Is Required", 12, "yellow") + parametersHeader.default = DetailsFramework:CreateLabel (parametersHeader, "Default Value", 12, "yellow") + parametersHeader.name:SetPoint ("left", parametersHeader, "left", 2, 0) + parametersHeader.typeData:SetPoint ("left", parametersHeader, "left", space1, 0) + parametersHeader.required:SetPoint ("left", parametersHeader, "left", space2, 0) + parametersHeader.default:SetPoint ("left", parametersHeader, "left", space3, 0) + + local parameterOnEnter = function (self) + GameCooltip2:Preset(2) + GameCooltip2:SetOwner (self) + + --fill the box in the right with information about the API + local apiInfo = Details.API_Description [currentSelected] + if (not apiInfo) then + return + end + GameCooltip2:AddLine (apiInfo.parameters [self.index].desc) + GameCooltip2:ShowCooltip() + + self:SetBackdropColor (unpack (backdropColorOnEnter)) + end + local parameterOnLeave = function (self) + GameCooltip2:Hide() + self:SetBackdropColor (unpack (backdropColor)) + end + + for i = 1, parametersAmount do + local parameterLine = {} + local f = CreateFrame ("frame", nil, Api2Frame) + f:SetSize (infoWidth, 20) + f:SetScript ("OnEnter", parameterOnEnter) + f:SetScript ("OnLeave", parameterOnLeave) + f:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}) + f:SetBackdropColor (unpack (backdropColor)) + f:Hide() + + f.name = DetailsFramework:CreateLabel (f) + f.typeData = DetailsFramework:CreateLabel (f) + f.required = DetailsFramework:CreateLabel (f) + f.default = DetailsFramework:CreateLabel (f) + + f:SetPoint ("topleft", Api2Frame, "topleft", xAnchorPoint, parametersYStart + (-i * 20)) + + f.name:SetPoint ("left", f, "left", 2, 0) + f.typeData:SetPoint ("left", f, "left", space1, 0) + f.required:SetPoint ("left", f, "left", space2, 0) + f.default:SetPoint ("left", f, "left", space3, 0) + + tinsert (parametersLines, f) + end + + --return value box + local returnYStart = yStart - 260 + local returnString = DetailsFramework:CreateLabel (Api2Frame, "Return Values", 12, "orange") + returnString:SetPoint ("topleft", Api2Frame, "topleft", xAnchorPoint, returnYStart) + + returnYStart = returnYStart - 20 + + local space1 = 200 + local returnHeader = CreateFrame ("frame", nil, Api2Frame) + returnHeader:SetSize (infoWidth, 20) + returnHeader:SetPoint ("topleft", Api2Frame, "topleft", xAnchorPoint, returnYStart) + returnHeader:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}) + returnHeader:SetBackdropColor (unpack (backdropColor)) + returnHeader.name = DetailsFramework:CreateLabel (returnHeader, "Name", 12, "yellow") + returnHeader.typeData = DetailsFramework:CreateLabel (returnHeader, "Type", 12, "yellow") + returnHeader.name:SetPoint ("left", returnHeader, "left", 2, 0) + returnHeader.typeData:SetPoint ("left", returnHeader, "left", space1, 0) + + local returnOnEnter = function (self) + self:SetBackdropColor (unpack (backdropColorOnEnter)) + end + local returnOnLeave = function (self) + self:SetBackdropColor (unpack (backdropColor)) + end + + for i = 1, returnAmount do + local parameterLine = {} + local f = CreateFrame ("frame", nil, Api2Frame) + f:SetSize (infoWidth, 20) + f:SetScript ("OnEnter", returnOnEnter) + f:SetScript ("OnLeave", returnOnLeave) + f:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}) + f:SetBackdropColor (unpack (backdropColor)) + f:Hide() + + f.name = DetailsFramework:CreateLabel (f) + f.typeData = DetailsFramework:CreateLabel (f) + + f.desc = DetailsFramework:CreateLabel (f, "", 10, "gray") + f.desc.width = infoWidth + f.desc.height = 60 + f.desc.valign = "top" + + f:SetPoint ("topleft", Api2Frame, "topleft", xAnchorPoint, returnYStart + (-i * 20)) + + f.name:SetPoint ("left", f, "left", 2, 0) + f.typeData:SetPoint ("left", f, "left", space1, 0) + + f.desc:SetPoint ("topleft", f.name, "bottomleft", 0, -5) + + tinsert (returnLines, f) + end + + function Api2Frame.Refresh() + onSelectAPI (api2ScrollMenu.Frames [1]) + end + end + + DetailsAPI2Frame:Show() + DetailsAPI2Frame.Refresh() + + DetailsPluginContainerWindow.OpenPlugin (DetailsAPI2Frame) + end @@ -7052,3 +7433,16 @@ function _detalhes:ShowImportWindow (defaultText, confirmFunc, titleText) end) end + + +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +--> api2 window + +function Details:ShowApi2() + + +end + + + + diff --git a/functions/api2.lua b/functions/api2.lua index 505f951e..61f772ab 100644 --- a/functions/api2.lua +++ b/functions/api2.lua @@ -48,7 +48,8 @@ Details.API_Description = {} --[=[ Details.SegmentElapsedTime (segment) --=]=] -Details.API_Description.SegmentElapsedTime = { +tinsert (Details.API_Description, { + name = "SegmentElapsedTime", desc = "Return the total elapsed time of a segment.", parameters = { { @@ -65,7 +66,8 @@ Details.API_Description.SegmentElapsedTime = { desc = "Number representing the elapsed time of a combat.", } }, -} + type = 1, --damage +}) function Details.SegmentElapsedTime (segment) segment = segment or 0 @@ -81,7 +83,8 @@ end --[=[ Details.UnitDamage (unitId, segment) --=]=] -Details.API_Description.UnitDamage = { +tinsert (Details.API_Description, { + name = "UnitDamage", desc = "Query the damage of a unit.", parameters = { { @@ -104,7 +107,8 @@ Details.API_Description.UnitDamage = { desc = "Number representing the unit damage.", } }, -} + type = 1, --damage +}) function Details.UnitDamage (unitId, segment) segment = segment or 0 @@ -128,7 +132,8 @@ end --[=[ Details.UnitSpellDamage (unitId, spellId, segment) --=]=] -Details.API_Description.UnitSpellDamage = { +tinsert (Details.API_Description, { + name = "UnitSpellDamage", desc = "Query the total damage done of a spell casted by the unit.", parameters = { { @@ -157,7 +162,8 @@ Details.API_Description.UnitSpellDamage = { desc = "Number representing the spell damage done.", } }, -} + type = 1, --damage +}) function Details.UnitSpellDamage (unitId, spellId, segment) segment = segment or 0 @@ -198,7 +204,8 @@ end --[=[ Details.UnitSpells (unitId, segment) --=]=] -Details.API_Description.UnitSpells = { +tinsert (Details.API_Description, { + name = "UnitDamageSpells", desc = "Return a numeric table with spells IDs used by the unit.", parameters = { { @@ -221,9 +228,10 @@ Details.API_Description.UnitSpells = { desc = "Number representing the spell damage done.", } }, -} + type = 1, --damage +}) -function Details.UnitSpells (unitId, segment) +function Details.UnitDamageSpells (unitId, segment) segment = segment or 0 local combatObject = getCombatObject (segment) @@ -251,7 +259,8 @@ end --[=[ Details.UnitDamageTaken (unitId, segment) --=]=] -Details.API_Description.UnitDamageTaken = { +tinsert (Details.API_Description, { + name = "UnitDamageTaken", desc = "Query the unit damage taken.", parameters = { { @@ -274,7 +283,8 @@ Details.API_Description.UnitDamageTaken = { desc = "Number representing the damage taken by the unit.", } }, -} + type = 1, --damage +}) function Details.UnitDamageTaken (unitId, segment) segment = segment or 0 @@ -297,7 +307,8 @@ end --[=[ Details.UnitDamageOnUnit (unitId, targetUnitId, segment) --=]=] -Details.API_Description.UnitDamageOnUnit = { +tinsert (Details.API_Description, { + name = "UnitDamageOnUnit", desc = "Query the unit damage done on another unit.", parameters = { { @@ -326,7 +337,8 @@ Details.API_Description.UnitDamageOnUnit = { desc = "Number representing the damage done by the unit on the target unit.", } }, -} + type = 1, --damage +}) function Details.UnitDamageOnUnit (unitId, targetUnitId, segment) segment = segment or 0 @@ -350,7 +362,8 @@ end --[=[ Details.UnitDamageTakenFromSpell (unitId, spellId, segment) --=]=] -Details.API_Description.UnitDamageTakenFromSpell = { +tinsert (Details.API_Description, { + name = "UnitDamageTakenFromSpell", desc = "Query the unit damage taken from a spell.", parameters = { { @@ -379,7 +392,8 @@ Details.API_Description.UnitDamageTakenFromSpell = { desc = "Number representing the damage taken by the unit from a spell.", } }, -} + type = 1, --damage +}) function Details.UnitDamageTakenFromSpell (unitId, spellId, segment) segment = segment or 0 @@ -413,7 +427,8 @@ end --[=[ Details.UnitDamageInfo (unitId, segment) --=]=] -Details.API_Description.UnitDamageInfo = { +tinsert (Details.API_Description, { + name = "UnitDamageInfo", desc = "Return a table with damage information.", parameters = { { @@ -436,7 +451,8 @@ Details.API_Description.UnitDamageInfo = { desc = "Table containing damage information, keys are: .total, .totalWithoutPet, .damageAbsorbed, .damageTaken, .friendlyFire and .activityTime", } }, -} + type = 1, --damage +}) function Details.UnitDamageInfo (unitId, segment) segment = segment or 0 @@ -476,7 +492,8 @@ end --[=[ Details.UnitSpellInfo (unitId, spellId, segment) --=]=] -Details.API_Description.UnitSpellInfo = { +tinsert (Details.API_Description, { + name = "UnitDamageSpellInfo", desc = "Return a table with the spell damage information.", parameters = { { @@ -505,9 +522,10 @@ Details.API_Description.UnitSpellInfo = { desc = "Table containing damage information, keys are: '.total', '.spellId', '.count', '.name', '.casted', '.regularMin', '.regularMax', '.regularAmount', '.regularDamage', '.criticalMin', '.criticalMax', '.criticalAmount', '.criticalDamage'", } }, -} + type = 1, --damage +}) -function Details.UnitSpellInfo (unitId, spellId, segment) +function Details.UnitDamageSpellInfo (unitId, spellId, segment) segment = segment or 0 local combatObject = getCombatObject (segment) diff --git a/functions/slash.lua b/functions/slash.lua index 5f742b91..3f898567 100644 --- a/functions/slash.lua +++ b/functions/slash.lua @@ -21,6 +21,8 @@ function SlashCmdList.DETAILS (msg, editbox) elseif (command == "api") then _detalhes.OpenAPI() + + elseif (command == Loc ["STRING_SLASH_NEW"] or command == "new") then _detalhes:CriarInstancia (nil, true) diff --git a/functions/timedata.lua b/functions/timedata.lua index 86078220..8229d9da 100644 --- a/functions/timedata.lua +++ b/functions/timedata.lua @@ -168,6 +168,55 @@ local tick_time = 0 + --from weakauras, list of functions to block on scripts + --source https://github.com/WeakAuras/WeakAuras2/blob/520951a4b49b64cb49d88c1a8542d02bbcdbe412/WeakAuras/AuraEnvironment.lua#L66 + local blockedFunctions = { + -- Lua functions that may allow breaking out of the environment + getfenv = true, + getfenv = true, + loadstring = true, + pcall = true, + xpcall = true, + getglobal = true, + + -- blocked WoW API + SendMail = true, + SetTradeMoney = true, + AddTradeMoney = true, + PickupTradeMoney = true, + PickupPlayerMoney = true, + TradeFrame = true, + MailFrame = true, + EnumerateFrames = true, + RunScript = true, + AcceptTrade = true, + SetSendMailMoney = true, + EditMacro = true, + SlashCmdList = true, + DevTools_DumpCommand = true, + hash_SlashCmdList = true, + CreateMacro = true, + SetBindingMacro = true, + GuildDisband = true, + GuildUninvite = true, + securecall = true, + + --additional + setmetatable = true, + } + + local functionFilter = setmetatable ({}, {__index = function (env, key) + if (key == "_G") then + return env + + elseif (blockedFunctions [key]) then + return nil + + else + return _G [key] + end + end}) + --> starting a combat function _detalhes:TimeDataCreateCombatTables() @@ -189,13 +238,18 @@ if (type (t [INDEX_FUNCTION]) == "string") then --> user - local func = loadstring (t [INDEX_FUNCTION]) + local func, errortext = loadstring (t [INDEX_FUNCTION]) if (func) then + setfenv (func, functionFilter) tinsert (exec, { func = func, data = data, attributes = table_deepcopy (t [INDEX_MATRIX]), is_user = true }) + else + _detalhes:Msg ("|cFFFF9900error compiling script for time data (charts)|r: ", errortext) end else --> plugin - tinsert (exec, { func = t [INDEX_FUNCTION], data = data, attributes = table_deepcopy (t [INDEX_MATRIX]) }) + local func = t [INDEX_FUNCTION] + setfenv (func, functionFilter) + tinsert (exec, { func = func, data = data, attributes = table_deepcopy (t [INDEX_MATRIX]) }) end end diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index d61b0250..9e012173 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -6848,6 +6848,57 @@ function _detalhes:RefreshMicroDisplays() _detalhes.StatusBar:UpdateOptions (self) end + +--from weakauras, list of functions to block on scripts +--source https://github.com/WeakAuras/WeakAuras2/blob/520951a4b49b64cb49d88c1a8542d02bbcdbe412/WeakAuras/AuraEnvironment.lua#L66 +local blockedFunctions = { + -- Lua functions that may allow breaking out of the environment + getfenv = true, + getfenv = true, + loadstring = true, + pcall = true, + xpcall = true, + getglobal = true, + + -- blocked WoW API + SendMail = true, + SetTradeMoney = true, + AddTradeMoney = true, + PickupTradeMoney = true, + PickupPlayerMoney = true, + TradeFrame = true, + MailFrame = true, + EnumerateFrames = true, + RunScript = true, + AcceptTrade = true, + SetSendMailMoney = true, + EditMacro = true, + SlashCmdList = true, + DevTools_DumpCommand = true, + hash_SlashCmdList = true, + CreateMacro = true, + SetBindingMacro = true, + GuildDisband = true, + GuildUninvite = true, + securecall = true, + + --additional + setmetatable = true, +} + +--function filter +local functionFilter = setmetatable ({}, {__index = function (env, key) + if (key == "_G") then + return env + + elseif (blockedFunctions [key]) then + return nil + + else + return _G [key] + end +end}) + function _detalhes:ChangeSkin (skin_name) if (not skin_name) then @@ -7128,22 +7179,39 @@ function _detalhes:ChangeSkin (skin_name) --> set the scale self:SetWindowScale() - -->: refresh lock buttons + --> refresh lock buttons self:RefreshLockedState() + --> clear any control sscript running in this instance + self.bgframe:SetScript ("OnUpdate", nil) + self.bgframe.skin_script = nil + + --> check if the skin has control scripts to run if (not just_updating or _detalhes.initializing) then - if (this_skin.callback) then - this_skin:callback (self, just_updating) + local callbackFunc = this_skin.callback + if (callbackFunc) then + setfenv (callbackFunc, functionFilter) + local okey, result = pcall (callbackFunc, this_skin, self, just_updating) + if (not okey) then + _detalhes:Msg ("|cFFFF9900error on skin callback function|r:", result) + end end if (this_skin.control_script) then - if (this_skin.control_script_on_start) then - this_skin:control_script_on_start (self) + local onStartScript = this_skin.control_script_on_start + if (onStartScript) then + setfenv (onStartScript, functionFilter) + local okey, result = pcall (onStartScript, this_skin, self) + if (not okey) then + _detalhes:Msg ("|cFFFF9900error on skin control on start function|r:", result) + end end - self.bgframe:SetScript ("OnUpdate", this_skin.control_script) + + local controlFunc = this_skin.control_script + setfenv (controlFunc, functionFilter) + self.bgframe:SetScript ("OnUpdate", controlFunc) self.bgframe.skin_script = true self.bgframe.skin = this_skin - --self.bgframe.skin_script_instance = true end end diff --git a/startup.lua b/startup.lua index e2244662..b36c79d7 100644 --- a/startup.lua +++ b/startup.lua @@ -1623,7 +1623,9 @@ function _G._detalhes:Start() --> open welcome if (self.is_first_run) then - _detalhes:OpenWelcomeWindow() + C_Timer.After (1, function() --wait details full load the rest of the systems before executing the welcome window + _detalhes:OpenWelcomeWindow() + end) end --> load broadcaster tools @@ -1733,11 +1735,61 @@ function _G._detalhes:Start() local codeTable = _detalhes.run_code _detalhes.AutoRunCode = {} + --from weakauras, list of functions to block on scripts + --source https://github.com/WeakAuras/WeakAuras2/blob/520951a4b49b64cb49d88c1a8542d02bbcdbe412/WeakAuras/AuraEnvironment.lua#L66 + local blockedFunctions = { + -- Lua functions that may allow breaking out of the environment + getfenv = true, + getfenv = true, + loadstring = true, + pcall = true, + xpcall = true, + getglobal = true, + + -- blocked WoW API + SendMail = true, + SetTradeMoney = true, + AddTradeMoney = true, + PickupTradeMoney = true, + PickupPlayerMoney = true, + TradeFrame = true, + MailFrame = true, + EnumerateFrames = true, + RunScript = true, + AcceptTrade = true, + SetSendMailMoney = true, + EditMacro = true, + SlashCmdList = true, + DevTools_DumpCommand = true, + hash_SlashCmdList = true, + CreateMacro = true, + SetBindingMacro = true, + GuildDisband = true, + GuildUninvite = true, + securecall = true, + + --additional + setmetatable = true, + } + + local functionFilter = setmetatable ({}, {__index = function (env, key) + if (key == "_G") then + return env + + elseif (blockedFunctions [key]) then + return nil + + else + return _G [key] + end + end}) + --> compile and store code function _detalhes:RecompileAutoRunCode() for codeKey, code in pairs (codeTable) do local func, errorText = loadstring (code) if (func) then + setfenv (func, functionFilter) _detalhes.AutoRunCode [codeKey] = func else --> if the code didn't pass, create a dummy function for it without triggering errors