From eca87f37f15b0dd1e280098a705e5433a220eb09 Mon Sep 17 00:00:00 2001 From: tercio Date: Thu, 28 Aug 2014 21:46:40 -0300 Subject: [PATCH] - Added Boss Emotes tab for Encounter Details plugin. --- boot.lua | 7 +- framework/dropdown.lua | 9 +- .../Details_EncounterDetails.lua | 37 +- .../Details_EncounterDetails.toc | 2 + plugins/Details_EncounterDetails/frames.lua | 389 ++++++++++++++++-- .../images/boss_frame_buttons.tga | Bin 8666 -> 14352 bytes 6 files changed, 413 insertions(+), 31 deletions(-) diff --git a/boot.lua b/boot.lua index bb8087cd..00c088e3 100644 --- a/boot.lua +++ b/boot.lua @@ -3,8 +3,8 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.build_counter = 46 --it's 50 for release - _detalhes.userversion = "v1.24.1" + _detalhes.build_counter = 46 --it's 51 for release + _detalhes.userversion = "v1.24.2" _detalhes.realversion = 26 _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" @@ -19,6 +19,7 @@ do --[[ |cFFFFFF00a1.24.0 (|cFFFFCC00Ago 27, 2014|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r Added a Boss Emotes tab for Encounter Details plugin |cFF999999(thanks Bloodforce-Azralon)|r.\n\n |cFFFFFF00-|r Rework on Activity Time, now it is tuned to closely match warcraftlogs |cFF999999(thanks www.warcraftlogs.com)|r.\n\n |cFFFFFF00-|r Added two new customs: Damage Activity Time and Healing Activity Time.\n\n |cFFFFFF00-|r Time Attack Plugin now have six fixed time amount options for test your dps on training dummies.\n\n @@ -27,7 +28,7 @@ do --]] - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00a1.24.0 (|cFFFFCC00Ago 27, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Rework on Activity Time, now it is tuned to closely match warcraftlogs |cFF999999(thanks www.warcraftlogs.com)|r.\n\n|cFFFFFF00-|r Added two new customs: Damage Activity Time and Healing Activity Time.\n\n|cFFFFFF00-|r Time Attack Plugin now have six fixed time amount options for test your dps on training dummies.\n\n|cFFFFFF00-|r Time Attack Plugin can now also share results on your realm, between players with the same class.\n\n|cFFFFFF00v1.23.6 (|cFFFFCC00Ago 24, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added 2 new bar textures and 6 new fonts.\n\n|cFFFFFF00-|r Swapped left and middle button for enemy bars, now left button open damage taken and middle button player detail window.\n\n|cFFFFFF00-|r Added new skin: Minimalistic v2.\n\n|cFFFFFF00-|r Minimalistic v2 is now the default skin.\n\n|cFFFFFF00-|r Few changes on both icon packs with transparency.\n\n|cFFFFFF00-|r Replaced the slash command '/d' with '/de' |cFF999999(thanks @kamuul-mmochampion forum)|r.\n\n|cFFFFFF00-|r Added custom spells for Atonement, Power Word: Solance and Life Bloom |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00v1.22.4 (|cFFFFCC00Ago 15, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added new skin: ElvUI Frame Style (Black White).\n\n|cFFFFFF00-|r Align With Right Chat Window option now check if the window have statusbar enabled.\n\n|cFFFFFF00-|r Few improvements on report for Deaths and Spells over Player Detail Window.\n\n|cFFFFFF00-|r Added option to disable reset button (reset only using its tooltip menu).\n\n|cFFFFFF00-|r Added option for disable window groups.\n\n|cFFFFFF00-|r Added option for select the icon pack to use, also added black white icon pack.\n\n|cFFFFFF00-|r Fixed many bugs involving skins and profiles, thing should run more smooth now.\n\n|cFFFFFF00-|r Plugin Time Attack now correctly saves the attempt when pressing the big save button.\n\n|cFFFFFF00-|r Added support for hotcorners.\n\n|cFFFFFF00v1.21.4 (|cFFFFCC00Ago 9, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Shaman's Ancestral Guidance on cooldowns list |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Added a profile selection screen when Details! are running for the first time on a character.\n\n|cFFFFFF00-|r Added Menu Text Size option over miscellaneous section on options panel |cFF999999(thanks @ Revi-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed a bug over Healing Player Details Window where pets wasn't being shown |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed issue with summoning pets with unknown owners where it was breaking the summon of all the others pets. |cFF999999(thanks @ThunderLost-curse website)|r.\n\n|cFFFFFF00-|r Hot Corners isn't no more a part of Details!, instead of that, Hot Corner is now a standalone addon which needs to be installed separately for who wants to use it.\n\n|cFFFFFF00-|r Skin data is now stored inside the profiles, many code parts got rewrite, still may have few bugs but it's more reliable then before.\n\n|cFFFFFF00-|r Rework on Auras and Voidzones: now shows damage, dps and percentage. Also its tooltip got fixes and now shows the correct damage done to players.\n\n|cFFFFFF00-|r Tooltip for Enemies now shows damage taken from players |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00-|r Right clicking a real-time enemy bar, makes it back to Enemies display instead of show Bookmark panel |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00-|r Tank comparison from previous segment now uses the same percentage method from player comparison panel.\n\n|cFFFFFF00-|r Fix bug with the slash command 'show' where was ignoring the window limit set on options panel |cFF999999(thanks @Castiel-US-Azralon realm)|r.\n\n|cFFFFFF00-|r Fixed few bugs with scroll bars, including scrolls on dropdown menu and player detail window |cFF999999(thanks @Revi-mmochampion forum)|r.\n\n|cFFFFFF00v1.20.2 (|cFFFFCC00Aug 1, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a option under Miscellaneous section to provide spell link instead of spell name for helpful spells when reporting a death |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Improvements done on how deaths are handled, now latest events before death will be more precise.\n\n|cFFFFFF00-|r Implemented Damage Taken from environment like lava, gravity, etc.\n\n|cFFFFFF00-|r Added Warlock's Fire and Brimstone spell on customized spells.\n\n|cFFFFFF00-|r Added dwarf racial Stone Form on cooldown list |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Bookmark now are shared between all characters.\n\n|cFFFFFF00-|r Fixed few inconsistencies with trash recognition.\n\n|cFFFFFF00-|r Fixed Cloud Capture where sometimes it wasn't sharing.\n\n|cFFFFFF00-|r Fixed report where it wasn't sharing for guild and raid when the player name box were empty.\n\n|cFFFFFF00-|r Report box now also saves the position and the last channel used to report |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r You Are Not Prepared plugin now have tooltips for spells and its window auto opens after a boss encounter.\n\n|cFFFFFF00-|r Advanced Death Logs plugin got full rewrite (and still are in development).\n\n|cFFFFFF00v1.19.0 - v1.19.1 - v1.19.2 (|cFFFFCC00Jul 21, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Details! is now able to be translated by its community for all supported languages through Curse Forge Web Site:\n\n|cFFFFFF00http://wow.curseforge.com/addons/details/localization/|r\n\n|cFFFFFF00-|r Slash commands now are multi language, accepting both english and the localized language.\n\n|cFFFFFF00-|r Added Data Broker for: Combat Time, Player Dps and Player Hps.\n\n|cFFFFFF00-|r Rework on plugins: Timeline, You Are Not Prepared, Tiny Threat, Encounter Details. All those plugins got a options panel and few improvaments.\n\n|cFFFFFF00-|r Trash segments won't be saved anymore.\n\n|cFFFFFF00-|r Added support for plugins options.\n\n|cFFFFFF00-|r Revamp on Deaths report lines, adding links for harmful spells and changing the text order |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Modified the percentage used on Comparison panel |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed the Raid Dps and Hps data exported by Data Broker |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00v1.18.4 - v1.18.5 - v1.18.6 (|cFFFFCC00Jul 13, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added option to customize the bar left text.\n\n|cFFFFFF00-|r Added option for show or hide bar placement number.\n\n|cFFFFFF00-|r Spell icon is shown in the bar when the enemy character is a environment spell type.\n\n|cFFFFFF00-|r Changed the non-player enemy icon (monsters).\n\n|cFFFFFF00-|r Fixed bug on flex performance profile |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Added new version tracker which should alert you when a newer Details! version is found.\n\n|cFFFFFF00-|r Added Enemy Damage Taken by clicking with middle mouse button over a enemy bar (enemies display).\n\n|cFFFFFF00-|r Added import/export for saved skins and custom displays created.\n\n|cFFFFFF00-|r Small changes on ElvUI Frame Style skin (need reaply).\n\n|cFFFFFF00-|r Fixed the death recognition for bosses, now it should show the correct color over segments menu.\n\n|cFFFFFF00-|r Fixed Dps inacuracy when plyaing solo (no party or raid group).\n\n|cFFFFFF00-|r Fixed the duration time of buffs applied before the pull, like pre-potions.\n\n|cFFFFFF00v1.17.5 (|cFFFFCC00Jun 30, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Shortcut panel is now known as Bookmarks and a revamp has done on its panel.\n\n|cFFFFFF00-|r NickTag now doesnt check anymore if a received nickname from other guild member is invalid.\n\n|cFFFFFF00-|r Healthstone now is considered a cooldown.\n\n|cFFFFFF00-|r Few improvements on Default Skin, Minimalistic Skin and ElvUI Frame Style Skin.\n\n|cFFFFFF00-|r Revamp on Image Editor, many bugs solves and now it is usable.\n\n|cFFFFFF00-|r 'Hide' slash command now hides all opened windows; 'Show', open all closed windows and 'New' create a new window.\n\n|cFFFFFF00-|r Added Devotion Aura, Rallying Cry as cooldowns.\n\n|cFFFFFF00-|r Added options for lock, unlock, break snap, close, reopen and create new window." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00a1.24.2 (|cFFFFCC00Ago 28, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a Boss Emotes tab for Encounter Details plugin |cFF999999(thanks Bloodforce-Azralon)|r.\n\n|cFFFFFF00-|r Rework on Activity Time, now it is tuned to closely match warcraftlogs |cFF999999(thanks www.warcraftlogs.com)|r.\n\n|cFFFFFF00-|r Added two new customs: Damage Activity Time and Healing Activity Time.\n\n|cFFFFFF00-|r Time Attack Plugin now have six fixed time amount options for test your dps on training dummies.\n\n|cFFFFFF00-|r Time Attack Plugin can now also share results on your realm, between players with the same class.\n\n|cFFFFFF00v1.23.6 (|cFFFFCC00Ago 24, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added 2 new bar textures and 6 new fonts.\n\n|cFFFFFF00-|r Swapped left and middle button for enemy bars, now left button open damage taken and middle button player detail window.\n\n|cFFFFFF00-|r Added new skin: Minimalistic v2.\n\n|cFFFFFF00-|r Minimalistic v2 is now the default skin.\n\n|cFFFFFF00-|r Few changes on both icon packs with transparency.\n\n|cFFFFFF00-|r Replaced the slash command '/d' with '/de' |cFF999999(thanks @kamuul-mmochampion forum)|r.\n\n|cFFFFFF00-|r Added custom spells for Atonement, Power Word: Solance and Life Bloom |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00v1.22.4 (|cFFFFCC00Ago 15, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added new skin: ElvUI Frame Style (Black White).\n\n|cFFFFFF00-|r Align With Right Chat Window option now check if the window have statusbar enabled.\n\n|cFFFFFF00-|r Few improvements on report for Deaths and Spells over Player Detail Window.\n\n|cFFFFFF00-|r Added option to disable reset button (reset only using its tooltip menu).\n\n|cFFFFFF00-|r Added option for disable window groups.\n\n|cFFFFFF00-|r Added option for select the icon pack to use, also added black white icon pack.\n\n|cFFFFFF00-|r Fixed many bugs involving skins and profiles, thing should run more smooth now.\n\n|cFFFFFF00-|r Plugin Time Attack now correctly saves the attempt when pressing the big save button.\n\n|cFFFFFF00-|r Added support for hotcorners.\n\n|cFFFFFF00v1.21.4 (|cFFFFCC00Ago 9, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Shaman's Ancestral Guidance on cooldowns list |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Added a profile selection screen when Details! are running for the first time on a character.\n\n|cFFFFFF00-|r Added Menu Text Size option over miscellaneous section on options panel |cFF999999(thanks @ Revi-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed a bug over Healing Player Details Window where pets wasn't being shown |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed issue with summoning pets with unknown owners where it was breaking the summon of all the others pets. |cFF999999(thanks @ThunderLost-curse website)|r.\n\n|cFFFFFF00-|r Hot Corners isn't no more a part of Details!, instead of that, Hot Corner is now a standalone addon which needs to be installed separately for who wants to use it.\n\n|cFFFFFF00-|r Skin data is now stored inside the profiles, many code parts got rewrite, still may have few bugs but it's more reliable then before.\n\n|cFFFFFF00-|r Rework on Auras and Voidzones: now shows damage, dps and percentage. Also its tooltip got fixes and now shows the correct damage done to players.\n\n|cFFFFFF00-|r Tooltip for Enemies now shows damage taken from players |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00-|r Right clicking a real-time enemy bar, makes it back to Enemies display instead of show Bookmark panel |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00-|r Tank comparison from previous segment now uses the same percentage method from player comparison panel.\n\n|cFFFFFF00-|r Fix bug with the slash command 'show' where was ignoring the window limit set on options panel |cFF999999(thanks @Castiel-US-Azralon realm)|r.\n\n|cFFFFFF00-|r Fixed few bugs with scroll bars, including scrolls on dropdown menu and player detail window |cFF999999(thanks @Revi-mmochampion forum)|r.\n\n|cFFFFFF00v1.20.2 (|cFFFFCC00Aug 1, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a option under Miscellaneous section to provide spell link instead of spell name for helpful spells when reporting a death |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Improvements done on how deaths are handled, now latest events before death will be more precise.\n\n|cFFFFFF00-|r Implemented Damage Taken from environment like lava, gravity, etc.\n\n|cFFFFFF00-|r Added Warlock's Fire and Brimstone spell on customized spells.\n\n|cFFFFFF00-|r Added dwarf racial Stone Form on cooldown list |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Bookmark now are shared between all characters.\n\n|cFFFFFF00-|r Fixed few inconsistencies with trash recognition.\n\n|cFFFFFF00-|r Fixed Cloud Capture where sometimes it wasn't sharing.\n\n|cFFFFFF00-|r Fixed report where it wasn't sharing for guild and raid when the player name box were empty.\n\n|cFFFFFF00-|r Report box now also saves the position and the last channel used to report |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r You Are Not Prepared plugin now have tooltips for spells and its window auto opens after a boss encounter.\n\n|cFFFFFF00-|r Advanced Death Logs plugin got full rewrite (and still are in development).\n\n|cFFFFFF00v1.19.0 - v1.19.1 - v1.19.2 (|cFFFFCC00Jul 21, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Details! is now able to be translated by its community for all supported languages through Curse Forge Web Site:\n\n|cFFFFFF00http://wow.curseforge.com/addons/details/localization/|r\n\n|cFFFFFF00-|r Slash commands now are multi language, accepting both english and the localized language.\n\n|cFFFFFF00-|r Added Data Broker for: Combat Time, Player Dps and Player Hps.\n\n|cFFFFFF00-|r Rework on plugins: Timeline, You Are Not Prepared, Tiny Threat, Encounter Details. All those plugins got a options panel and few improvaments.\n\n|cFFFFFF00-|r Trash segments won't be saved anymore.\n\n|cFFFFFF00-|r Added support for plugins options.\n\n|cFFFFFF00-|r Revamp on Deaths report lines, adding links for harmful spells and changing the text order |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Modified the percentage used on Comparison panel |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed the Raid Dps and Hps data exported by Data Broker |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00v1.18.4 - v1.18.5 - v1.18.6 (|cFFFFCC00Jul 13, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added option to customize the bar left text.\n\n|cFFFFFF00-|r Added option for show or hide bar placement number.\n\n|cFFFFFF00-|r Spell icon is shown in the bar when the enemy character is a environment spell type.\n\n|cFFFFFF00-|r Changed the non-player enemy icon (monsters).\n\n|cFFFFFF00-|r Fixed bug on flex performance profile |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Added new version tracker which should alert you when a newer Details! version is found.\n\n|cFFFFFF00-|r Added Enemy Damage Taken by clicking with middle mouse button over a enemy bar (enemies display).\n\n|cFFFFFF00-|r Added import/export for saved skins and custom displays created.\n\n|cFFFFFF00-|r Small changes on ElvUI Frame Style skin (need reaply).\n\n|cFFFFFF00-|r Fixed the death recognition for bosses, now it should show the correct color over segments menu.\n\n|cFFFFFF00-|r Fixed Dps inacuracy when plyaing solo (no party or raid group).\n\n|cFFFFFF00-|r Fixed the duration time of buffs applied before the pull, like pre-potions.\n\n|cFFFFFF00v1.17.5 (|cFFFFCC00Jun 30, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Shortcut panel is now known as Bookmarks and a revamp has done on its panel.\n\n|cFFFFFF00-|r NickTag now doesnt check anymore if a received nickname from other guild member is invalid.\n\n|cFFFFFF00-|r Healthstone now is considered a cooldown.\n\n|cFFFFFF00-|r Few improvements on Default Skin, Minimalistic Skin and ElvUI Frame Style Skin.\n\n|cFFFFFF00-|r Revamp on Image Editor, many bugs solves and now it is usable.\n\n|cFFFFFF00-|r 'Hide' slash command now hides all opened windows; 'Show', open all closed windows and 'New' create a new window.\n\n|cFFFFFF00-|r Added Devotion Aura, Rallying Cry as cooldowns.\n\n|cFFFFFF00-|r Added options for lock, unlock, break snap, close, reopen and create new window." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " --> startup diff --git a/framework/dropdown.lua b/framework/dropdown.lua index da633471..a4344b9a 100644 --- a/framework/dropdown.lua +++ b/framework/dropdown.lua @@ -257,7 +257,7 @@ local DropDownMetaFunctions = {} function DropDownMetaFunctions:Enable() - self:SetAlpha (.4) + self:SetAlpha (1) return _rawset (self, "lockdown", false) --return self.dropdown:Enable() end @@ -301,17 +301,19 @@ end function DropDownMetaFunctions:Refresh() local menu = self.func() + if (#menu == 0) then self:NoOption (true) self.no_options = true return false + elseif (self.no_options) then self.no_options = false self:NoOption (false) self:NoOptionSelected() return true end - + return true end @@ -333,13 +335,14 @@ function DropDownMetaFunctions:NoOption (state) if (state) then self:Disable() self:SetAlpha (0.5) - + self.no_options = true self.label:SetText ("no options") self.label:SetTextColor (1, 1, 1, 0.4) self.icon:SetTexture ([[Interface\CHARACTERFRAME\UI-Player-PlayTimeUnhealthy]]) self.icon:SetTexCoord (0, 1, 0, 1) self.icon:SetVertexColor (1, 1, 1, 0.4) else + self.no_options = false self:Enable() self:SetAlpha (1) end diff --git a/plugins/Details_EncounterDetails/Details_EncounterDetails.lua b/plugins/Details_EncounterDetails/Details_EncounterDetails.lua index 4a00f852..e21a0918 100644 --- a/plugins/Details_EncounterDetails/Details_EncounterDetails.lua +++ b/plugins/Details_EncounterDetails/Details_EncounterDetails.lua @@ -39,6 +39,7 @@ local CLASS_ICON_TCOORDS = _G.CLASS_ICON_TCOORDS EncounterDetails.name = "Encounter Details" + local ability_type_table = { [0x1] = "|cFF00FF00"..Loc ["STRING_HEAL"].."|r", [0x2] = "|cFF710000"..Loc ["STRING_LOWDPS"].."|r", @@ -90,7 +91,7 @@ local function CreatePluginFrames (data) --> when details finish his startup and are ready to work elseif (event == "DETAILS_STARTED") then - + --> check if details are in combat, if not check if the last fight was a boss fight if (not EncounterDetails:IsInCombat()) then --> get the current combat table @@ -149,6 +150,8 @@ local function CreatePluginFrames (data) --EncounterDetails:HideIcon() EncounterDetails:CloseWindow() end + + EncounterDetails.current_whisper_table = {} elseif (event == "COMBAT_PLAYER_LEAVE") then --> combat leave and enter always send current combat table @@ -161,6 +164,16 @@ local function CreatePluginFrames (data) if (EncounterDetails.db.show_icon == 5) then EncounterDetails:AutoShowIcon() end + + local whisper_table = EncounterDetails.current_whisper_table + if (_combat_object.is_boss and _combat_object.is_boss.name) then + whisper_table.boss = _combat_object.is_boss.name + tinsert (EncounterDetails.boss_emotes_table, 1, whisper_table) + + if (#EncounterDetails.boss_emotes_table > EncounterDetails.db.max_emote_segments) then + table.remove (EncounterDetails.boss_emotes_table, EncounterDetails.db.max_emote_segments+1) + end + end elseif (event == "COMBAT_BOSS_FOUND") then EncounterDetails.combat_boss_found = true @@ -180,6 +193,8 @@ local function CreatePluginFrames (data) --drop last combat table EncounterDetails.LastSegmentShown = nil + + --table.wipe (EncounterDetails.boss_emotes_table) elseif (event == "GROUP_ONENTER") then if (EncounterDetails.db.show_icon == 2) then @@ -717,6 +732,10 @@ function EncounterDetails:OpenAndRefresh (_, segment) local frame = EncounterDetailsFrame --alias local _combat_object = _combat_object + if (not _combat_object) then + return + end + if (segment) then --get combat segment, 1 more recently ...25 oldest _combat_object = EncounterDetails:GetCombat (segment) @@ -1510,6 +1529,7 @@ function EncounterDetails:OnEvent (_, event, ...) local default_settings = { show_icon = 5, --automatic hide_on_combat = false, --hide the window when a new combat start + max_emote_segments = 3, } --> Install @@ -1531,6 +1551,11 @@ function EncounterDetails:OnEvent (_, event, ...) EncounterDetails.db = saveddata + EncounterDetails.charsaved = EncounterDetailsDB or {emotes = {}} + EncounterDetailsDB = EncounterDetails.charsaved + + EncounterDetails.boss_emotes_table = EncounterDetails.charsaved.emotes + --> Register needed events _G._detalhes:RegisterEvent (EncounterDetails, "COMBAT_PLAYER_ENTER") _G._detalhes:RegisterEvent (EncounterDetails, "COMBAT_PLAYER_LEAVE") @@ -1542,6 +1567,16 @@ function EncounterDetails:OnEvent (_, event, ...) _G._detalhes:RegisterEvent (EncounterDetails, "ZONE_TYPE_CHANGED") + EncounterDetails.BossWhispColors = { + [1] = "RAID_BOSS_EMOTE", + [2] = "RAID_BOSS_WHISPER", + [3] = "MONSTER_EMOTE", + [4] = "MONSTER_SAY", + [5] = "MONSTER_WHISPER", + [6] = "MONSTER_PARTY", + [7] = "MONSTER_YELL", + } + end end diff --git a/plugins/Details_EncounterDetails/Details_EncounterDetails.toc b/plugins/Details_EncounterDetails/Details_EncounterDetails.toc index 8889c368..13d6bb86 100644 --- a/plugins/Details_EncounterDetails/Details_EncounterDetails.toc +++ b/plugins/Details_EncounterDetails/Details_EncounterDetails.toc @@ -3,6 +3,8 @@ ## Notes: Plugin for Details ## RequiredDeps: Details ## OptionalDeps: Ace3 +## SavedVariablesPerCharacter: EncounterDetailsDB + #@no-lib-strip@ embeds.xml diff --git a/plugins/Details_EncounterDetails/frames.lua b/plugins/Details_EncounterDetails/frames.lua index 7043356e..59ad1d4c 100644 --- a/plugins/Details_EncounterDetails/frames.lua +++ b/plugins/Details_EncounterDetails/frames.lua @@ -6,6 +6,7 @@ do local Graphics = LibStub:GetLibrary("LibGraph-2.0") local _ipairs = ipairs local _math_floor = math.floor + local _cstr = string.format local _GetSpellInfo = _detalhes.getspellinfo _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) @@ -101,6 +102,19 @@ do desc = "Encounter Details window automatically close when you enter in combat.", name = "Hide on Combat" }, + { + type = "range", + get = function() return EncounterDetails.db.max_emote_segments end, + set = function (self, fixedparam, value) EncounterDetails.db.max_emote_segments = value end, + min = 1, + max = 10, + step = 1, + desc = "Keep how many segments emotes.", + name = "Emote Segments Amount", + usedecimals = true, + }, + + } DetailsFrameWork:BuildMenu (options_frame, menu, 15, -75, 260) @@ -119,6 +133,7 @@ do row.textura:SetAllPoints (row) local t = row.textura:CreateTexture (nil, "overlay") t:SetTexture ("Interface\\AddOns\\Details\\images\\bar_serenity") + --t:SetTexture ("Interface\\AddOns\\Details\\images\\bar_skyline") row.t = t row.textura:SetStatusBarTexture (t) row.textura:SetStatusBarColor(.5, .5, .5, 0) @@ -615,6 +630,10 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156: local selected local u + local mode_label + local scrollframe + local emote_segment = 1 + local searching BossFrame.switch = function (to) if (to == "main") then @@ -623,9 +642,6 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156: frame:Show() end - --BossFrame.buttonSwitchNormal:Disable() - --BossFrame.buttonSwitchGraphic:Enable() - selected:SetPoint ("center", BossFrame.buttonSwitchNormal, "center", 0, 1) u:SetAllPoints (BossFrame.buttonSwitchNormal) @@ -638,16 +654,53 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156: end BossFrame["timeamt0"]:Hide() end - - --BossFrame.StatusBar_damageicon:Show() - --BossFrame.StatusBar_healicon:Show() - --BossFrame.StatusBar_totaldamage:Show() - --BossFrame.StatusBar_totalheal:Show() + --hide emote frames + for _, widget in pairs (BossFrame.EmoteWidgets) do + widget:Hide() + end + BossFrame.ShowType = "main" - - elseif (to == "graph") then + mode_label.text = "Summary" + BossFrame.segmentosDropdown:Enable() + + elseif (to == "emotes") then + BossFrame.bg:SetTexture ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_bg_graphic") + + --hide boss frames + for _, frame in _ipairs (BossFrame.Widgets) do + frame:Hide() + end + --hide graph + if (_G.DetailsRaidDpsGraph) then + _G.DetailsRaidDpsGraph:Hide() + for i = 1, 8, 1 do + BossFrame["dpsamt"..i]:Hide() + BossFrame["timeamt"..i]:Hide() + + end + BossFrame["timeamt0"]:Hide() + end + --show emote frames + for _, widget in pairs (BossFrame.EmoteWidgets) do + widget:Show() + end + + selected:SetPoint ("center", BossFrame.buttonSwitchBossEmotes.widget, "center", 0, 1) + u:SetAllPoints (BossFrame.buttonSwitchBossEmotes.widget) + + BossFrame.ShowType = "emotes" + mode_label.text = "Boss Emotes" + + scrollframe:Update() + BossFrame.EmotesSegment:Refresh() + BossFrame.EmotesSegment:Select (emote_segment) + + BossFrame.segmentosDropdown:Disable() + + elseif (to == "graph") then + EncounterDetails:BuildDpsGraphic() if (not _G.DetailsRaidDpsGraph) then return @@ -661,9 +714,6 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156: selected:SetPoint ("center", BossFrame.buttonSwitchGraphic, "center", 0, 1) u:SetAllPoints (BossFrame.buttonSwitchGraphic) - --BossFrame.buttonSwitchNormal:Enable() - --BossFrame.buttonSwitchGraphic:Disable() - _G.DetailsRaidDpsGraph:Show() BossFrame.StatusBar_damageicon:Hide() @@ -678,11 +728,19 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156: BossFrame["timeamt0"].widget:Show() BossFrame.ShowType = "graph" + mode_label.text = "Damage Graphic" + + --hide emote frames + for _, widget in pairs (BossFrame.EmoteWidgets) do + widget:Hide() + end + + BossFrame.segmentosDropdown:Disable() end end BossFrame.buttonSwitchNormal = DetailsFrameWork:NewDetailsButton (BossFrame, BossFrame, _, BossFrame.switch, "main", nil, 26, 33) - BossFrame.buttonSwitchNormal:SetPoint ("bottomright", BossFrame, "bottomright", -10, 5) + BossFrame.buttonSwitchNormal:SetPoint ("bottomright", BossFrame, "bottomright", -244, 5) local t = BossFrame.buttonSwitchNormal:CreateTexture (nil, "artwork") t:SetTexture ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons") t:SetTexCoord (0, 0.1015625, 0, 0.515625) @@ -691,7 +749,7 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156: t:SetAllPoints (BossFrame.buttonSwitchNormal) BossFrame.buttonSwitchGraphic = DetailsFrameWork:NewDetailsButton (BossFrame, BossFrame, _, BossFrame.switch, "graph", nil, 26, 33) - BossFrame.buttonSwitchGraphic:SetPoint ("right", BossFrame.buttonSwitchNormal, "left", 0, 0) + BossFrame.buttonSwitchGraphic:SetPoint ("left", BossFrame.buttonSwitchNormal, "right", 0, 0) local g = BossFrame.buttonSwitchGraphic:CreateTexture (nil, "artwork") g:SetTexture ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons") g:SetTexCoord (0.1171875, 0.21875, 0, 0.515625) @@ -699,6 +757,16 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156: g:SetHeight (33) g:SetAllPoints (BossFrame.buttonSwitchGraphic) + BossFrame.buttonSwitchBossEmotes = DetailsFrameWork:NewButton (BossFrame, nil, "EncounterDetailsBossEmoteButton", nil, 26, 33, BossFrame.switch, "emotes") + BossFrame.buttonSwitchBossEmotes:SetPoint ("left", BossFrame.buttonSwitchGraphic, "right", 0, 0) + --BossFrame.buttonSwitchBossEmotes:SetPoint ("center", UIParent, "center") + local e = BossFrame.buttonSwitchBossEmotes:CreateTexture (nil, "artwork") + e:SetTexture ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons") + e:SetTexCoord (90/256, 116/256, 0, 0.515625) + e:SetWidth (26) + e:SetHeight (33) + e:SetAllPoints (BossFrame.buttonSwitchBossEmotes.widget) + u = BossFrame.buttonSwitchGraphic:CreateTexture (nil, "overlay") u:SetTexture ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons") u:SetTexCoord (0.8984375, 1, 0, 0.515625) @@ -712,20 +780,261 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156: selected:SetHeight (28) selected:SetPoint ("center", BossFrame.buttonSwitchNormal, "center", 0, 0) + --mode label + local support_frame = CreateFrame ("frame", nil, BossFrame) + support_frame:SetPoint ("topleft", BossFrame.buttonSwitchBossEmotes.widget, "topright", 0, -1) + support_frame:SetPoint ("bottomright", BossFrame, "bottomright", -9, 6) + support_frame:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16}) + support_frame:SetBackdropColor (1, 1, 1, 0.3) + + mode_label = DetailsFrameWork:CreateLabel (support_frame, "Summary", 13, color, "GameFontNormal") + --mode_label:SetPoint ("bottomright", BossFrame, "bottomright", -10, 16) + --mode_label:SetPoint ("left", BossFrame.buttonSwitchBossEmotes.widget, "right", 20, 0) + mode_label:SetPoint ("center", support_frame, "center") + + local left = support_frame:CreateTexture (nil, "overlay") + left:SetTexture ([[Interface\TALENTFRAME\talent-main]]) + left:SetTexCoord (0.13671875, 0.25, 0.486328125, 0.576171875) + left:SetPoint ("left", support_frame, 0, 0) + left:SetWidth (10) + left:SetHeight (support_frame:GetHeight()) + + local right = support_frame:CreateTexture (nil, "overlay") + right:SetTexture ([[Interface\TALENTFRAME\talent-main]]) + right:SetTexCoord (0.01953125, 0.13671875, 0.486328125, 0.576171875) + right:SetPoint ("right", support_frame, 0, 0) + right:SetWidth (10) + right:SetHeight (support_frame:GetHeight()) + + --tooltips BossFrame.buttonSwitchNormal.MouseOnEnterHook = function() GameCooltip:Reset() GameCooltip:AddLine (Loc ["STRING_FIGHT_SUMMARY"]) GameCooltip:ShowCooltip (BossFrame.buttonSwitchNormal, "tooltip") + t:SetBlendMode ("ADD") end - BossFrame.buttonSwitchNormal.MouseOnLeaveHook = function() _detalhes.popup:ShowMe (false) end - + BossFrame.buttonSwitchNormal.MouseOnLeaveHook = function() _detalhes.popup:ShowMe (false); t:SetBlendMode ("BLEND") end + -- BossFrame.buttonSwitchGraphic.MouseOnEnterHook = function() GameCooltip:Reset() GameCooltip:AddLine (Loc ["STRING_FIGHT_GRAPHIC"]) GameCooltip:ShowCooltip (BossFrame.buttonSwitchGraphic, "tooltip") + g:SetBlendMode ("ADD") end - BossFrame.buttonSwitchGraphic.MouseOnLeaveHook = function() _detalhes.popup:ShowMe (false) end + BossFrame.buttonSwitchGraphic.MouseOnLeaveHook = function() _detalhes.popup:ShowMe (false); g:SetBlendMode ("BLEND") end + -- + BossFrame.buttonSwitchBossEmotes:SetHook ("OnEnter", function() + GameCooltip:Reset() + GameCooltip:AddLine ("boss emotes") + GameCooltip:ShowCooltip (BossFrame.buttonSwitchBossEmotes, "tooltip") + e:SetBlendMode ("ADD") + end) + BossFrame.buttonSwitchBossEmotes:SetHook ("OnLeave", function() + _detalhes.popup:ShowMe (false); + e:SetBlendMode ("BLEND") + end) + + local emote_lines = {} + local emote_search_table = {} + + local refresh_emotes = function (self) + --update emote scroll + + local offset = FauxScrollFrame_GetOffset (self) + + --print (EncounterDetails.charsaved, EncounterDetails.charsaved.emotes, EncounterDetails.charsaved.emotes [1], #EncounterDetails.charsaved.emotes) + local emote_pool = EncounterDetails.charsaved.emotes [emote_segment] + + if (searching) then + local i = 0 + local lower = string.lower + for index, data in ipairs (emote_pool) do + if (lower (data [2]):find (lower(searching))) then + i = i + 1 + emote_search_table [i] = data + end + for o = #emote_search_table, i+1, -1 do + emote_search_table [o] = nil + end + emote_pool = emote_search_table + end + BossFrame.SearchResults:Show() + BossFrame.SearchResults:SetText ("Found " .. i .. " results") + else + BossFrame.SearchResults:Hide() + end + + if (emote_pool) then + for bar_index = 1, 16 do + local data = emote_pool [bar_index + offset] + local bar = emote_lines [bar_index] + + if (data) then + bar:Show() + local min, sec = _math_floor (data[1] / 60), _math_floor (data[1] % 60) + bar.lefttext:SetText (min .. "m" .. sec .. "s:") + + if (data [2] == "") then + bar.righttext:SetText ("--x--x--") + else + bar.righttext:SetText (_cstr (data [2], data [3])) + end + + local color_string = EncounterDetails.BossWhispColors [data [4]] + local color_table = ChatTypeInfo [color_string] + + bar.righttext:SetTextColor (color_table.r, color_table.g, color_table.b) + bar.icon:SetTexture ([[Interface\CHARACTERFRAME\UI-StateIcon]]) + bar.icon:SetTexCoord (0, 0.5, 0.5, 1) + else + bar:Hide() + end + end + + FauxScrollFrame_Update (self, #emote_pool, 16, 15) + else + for bar_index = 1, 16 do + local bar = emote_lines [bar_index] + bar:Hide() + end + end + end + BossFrame.EmoteWidgets = {} + + scrollframe = CreateFrame ("ScrollFrame", "EncounterDetails_EmoteScroll", BossFrame, "FauxScrollFrameTemplate") + scrollframe:SetScript ("OnVerticalScroll", function (self, offset) FauxScrollFrame_OnVerticalScroll (self, offset, 14, refresh_emotes) end) + scrollframe:SetPoint ("topleft", BossFrame, "topleft", 200, -75) + scrollframe:SetPoint ("bottomright", BossFrame, "bottomright", -33, 42) + --scrollframe:SetBackdrop({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16}) + --scrollframe:SetBackdropColor (1, 0, 0, 1) + scrollframe.Update = refresh_emotes + scrollframe:Hide() + -- + tinsert (BossFrame.EmoteWidgets, scrollframe) + local row_on_enter = function (self) + self:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16}) + self:SetBackdropColor (1, 1, 1, .6) + if (self.righttext:IsTruncated()) then + GameCooltip:Reset() + GameCooltip:AddLine (self.righttext:GetText()) + GameCooltip:SetOwner (self, "bottomleft", "topleft", 42, -9) + GameCooltip:Show() + end + end + local row_on_leave = function (self) + self:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16}) + self:SetBackdropColor (1, 1, 1, .3) + GameCooltip:Hide() + end + + for i = 1, 16 do + local line = CreateFrame ("frame", nil, BossFrame) + local y = (i-1) * 15 * -1 + line:SetPoint ("topleft", scrollframe, "topleft", 0, y) + line:SetPoint ("topright", scrollframe, "topright", 0, y) + line:SetHeight (14) + line:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16}) + line:SetBackdropColor (1, 1, 1, .3) + + line.icon = line:CreateTexture (nil, "overlay") + line.icon:SetPoint ("left", line, "left", 2, 0) + line.icon:SetSize (14, 14) + + line.lefttext = line:CreateFontString (nil, "overlay", "GameFontHighlightSmall") + line.lefttext:SetPoint ("left", line.icon, "right", 2, 0) + line.lefttext:SetWidth (line:GetWidth() - 22) + line.lefttext:SetHeight (14) + line.lefttext:SetJustifyH ("left") + + line.righttext = line:CreateFontString (nil, "overlay", "GameFontHighlightSmall") + line.righttext:SetPoint ("left", line.icon, "right", 42, 0) + line.righttext:SetWidth (line:GetWidth() - 60) + line.righttext:SetHeight (14) + line.righttext:SetJustifyH ("left") + + line:SetFrameLevel (scrollframe:GetFrameLevel()+1) + + line:SetScript ("OnEnter", row_on_enter) + line:SetScript ("OnLeave", row_on_leave) + tinsert (emote_lines, line) + tinsert (BossFrame.EmoteWidgets, line) + line:Hide() + end + + --select emote segment + local emotes_segment_label = DetailsFrameWork:CreateLabel (BossFrame, "Emote Segment:", 11, nil, "GameFontHighlightSmall") + emotes_segment_label:SetPoint ("topleft", BossFrame, "topleft", 25, -85) + + local on_emote_Segment_select = function (_, _, segment) + FauxScrollFrame_SetOffset (scrollframe, 0) + emote_segment = segment + scrollframe:Update() + end + + local segment_icon = [[Interface\AddOns\Details\images\icons]] + local segment_icon_coord = {0.7373046875, 0.9912109375, 0.6416015625, 0.7978515625} + local segment_icon_color = {1, 1, 1, 0.5} + + local build_emote_segments = function() + local t = {} + if (not EncounterDetails.charsaved) then + return t + end + for index, segment in ipairs (EncounterDetails.charsaved.emotes) do + tinsert (t, {label = "#" .. index .. " " .. (segment.boss or "unknown"), value = index, icon = segment_icon, texcoord = segment_icon_coord, onclick = on_emote_Segment_select, iconcolor = segment_icon_color}) + end + return t + end + local dropdown = DetailsFrameWork:NewDropDown (BossFrame, _, "$parentEmotesSegmentDropdown", "EmotesSegment", 160, 20, build_emote_segments, 1) + dropdown:SetPoint ("topleft", emotes_segment_label, "bottomleft", -1, -2) + + tinsert (BossFrame.EmoteWidgets, dropdown) + tinsert (BossFrame.EmoteWidgets, emotes_segment_label) + + --search box + local emotes_search_label = DetailsFrameWork:CreateLabel (BossFrame, "Search:", 11, nil, "GameFontHighlightSmall") + emotes_search_label:SetPoint ("topleft", BossFrame, "topleft", 25, -130) + + local emotes_search_results_label = DetailsFrameWork:CreateLabel (BossFrame, "", 11, nil, "GameFontNormal", "SearchResults") + emotes_search_results_label:SetPoint ("topleft", BossFrame, "topleft", 25, -180) + -- + local search = DetailsFrameWork:NewTextEntry (BossFrame, nil, "$parentEmoteSearchBox", nil, 160, 20) + search:SetPoint ("topleft",emotes_search_label, "bottomleft", -1, -2) + search:SetJustifyH ("left") + + search:SetHook ("OnTextChanged", function() + searching = search:GetText() + if (searching == "") then + searching = nil + FauxScrollFrame_SetOffset (scrollframe, 0) + scrollframe:Update() + else + FauxScrollFrame_SetOffset (scrollframe, 0) + scrollframe:Update() + end + end) + + local reset = DetailsFrameWork:NewButton (BossFrame, nil, "$parentResetSearchBoxtButton", "ResetSearchBox", 16, 16, function() + search:SetText ("") + end) + + reset:SetPoint ("left", search, "right", -1, 0) + reset:SetNormalTexture ([[Interface\Glues\LOGIN\Glues-CheckBox-Check]] or [[Interface\Buttons\UI-GroupLoot-Pass-Down]]) + reset:SetHighlightTexture ([[Interface\Glues\LOGIN\Glues-CheckBox-Check]] or [[Interface\Buttons\UI-GROUPLOOT-PASS-HIGHLIGHT]]) + reset:SetPushedTexture ([[Interface\Glues\LOGIN\Glues-CheckBox-Check]] or [[Interface\Buttons\UI-GroupLoot-Pass-Up]]) + reset:GetNormalTexture():SetDesaturated (true) + reset.tooltip = "Reset Search" + + tinsert (BossFrame.EmoteWidgets, search) + tinsert (BossFrame.EmoteWidgets, reset) + tinsert (BossFrame.EmoteWidgets, emotes_search_label) + + for _, widget in pairs (BossFrame.EmoteWidgets) do + widget:Hide() + end + + --window title DetailsFrameWork:NewLabel (BossFrame, BossFrame, nil, "titulo", Loc ["STRING_WINDOW_TITLE"], "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255}) BossFrame.titulo:SetPoint ("center", BossFrame, "center") BossFrame.titulo:SetPoint ("top", BossFrame, "top", 0, -18) @@ -801,16 +1110,18 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156: end local segmentos_string = DetailsFrameWork:NewLabel (frame, nil, nil, "segmentosString", "Segment:", "GameFontNormal", 12) - segmentos_string:SetPoint ("bottomleft", frame, "bottomleft", 20, 17) - _detalhes:SetFontColor (segmentos_string, "white") - _detalhes:SetFontSize (segmentos_string, 10) + segmentos_string:SetPoint ("bottomleft", frame, "bottomleft", 20, 16) + --_detalhes:SetFontColor (segmentos_string, "white") + --_detalhes:SetFontSize (segmentos_string, 10) local segmentos = DetailsFrameWork:NewDropDown (frame, _, "$parentSegmentsDropdown", "segmentosDropdown", 160, 18, buildSegmentosMenu, nil) segmentos:SetPoint ("left", segmentos_string, "right", 2, 0) - local options_button = DetailsFrameWork:NewButton (frame, _, "$parentOptionsButton", nil, 100, 18, EncounterDetails.OpenOptionsPanel, nil, nil, nil, "Options") - options_button:SetPoint ("left", segmentos, "right", 14, 0) - options_button.textalign = "<" + + local options = DetailsFrameWork:NewButton (frame, nil, "$parentOptionsButton", "OptionsButton", 86, 16, EncounterDetails.OpenOptionsPanel, nil, nil, nil, "Options") + options:SetPoint ("left", segmentos, "right", 7, -1) + options:SetTextColor (1, 0.93, 0.74) + options:SetIcon ([[Interface\Buttons\UI-OptionsButton]], 14, 14, nil, {0, 1, 0, 1}, nil, 3) --> Caixa do Dano total tomado pela Raid @@ -1359,5 +1670,35 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156: end) frame.fechar:SetFrameLevel (frame:GetFrameLevel()+2) + --emotes frame + local emote_frame = CreateFrame ("frame", "DetailsEncountersEmoteFrame", UIParent) + emote_frame:RegisterEvent ("CHAT_MSG_RAID_BOSS_EMOTE") + emote_frame:RegisterEvent ("CHAT_MSG_RAID_BOSS_WHISPER") + emote_frame:RegisterEvent ("CHAT_MSG_MONSTER_EMOTE") + emote_frame:RegisterEvent ("CHAT_MSG_MONSTER_SAY") + emote_frame:RegisterEvent ("CHAT_MSG_MONSTER_WHISPER") + emote_frame:RegisterEvent ("CHAT_MSG_MONSTER_PARTY") + emote_frame:RegisterEvent ("CHAT_MSG_MONSTER_YELL") + + local emote_table = { + ["CHAT_MSG_RAID_BOSS_EMOTE"] = 1, + ["CHAT_MSG_RAID_BOSS_WHISPER"] = 2, + ["CHAT_MSG_MONSTER_EMOTE"] = 3, + ["CHAT_MSG_MONSTER_SAY"] = 4, + ["CHAT_MSG_MONSTER_WHISPER"] = 5, + ["CHAT_MSG_MONSTER_PARTY"] = 6, + ["CHAT_MSG_MONSTER_YELL"] = 7, + } + + emote_frame:SetScript ("OnEvent", function (...) + local combat = EncounterDetails:GetCombat ("current") + --local arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 = ... + --print ("2 =", arg2, "3 =", arg3, "4 =", arg4, "5 =", arg5, "6 =", arg6, "7 =", arg7, "8 =", arg8, "9 =", arg9) + if (combat and EncounterDetails:IsInCombat() and EncounterDetails:GetZoneType() == "raid") then + local arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 = ... + tinsert (EncounterDetails.current_whisper_table, {combat:GetCombatTime(), arg3, arg4, emote_table [arg2]}) + end + end) + end end diff --git a/plugins/Details_EncounterDetails/images/boss_frame_buttons.tga b/plugins/Details_EncounterDetails/images/boss_frame_buttons.tga index 72c7430a8a03160c399bcf2a4c27adc1d84a934d..7d8f2edea0186d60ca26698f438577dd745307b5 100644 GIT binary patch delta 1799 zcmZvdTWl0%6vub=*6w|FXJ+rav)e7(vb4C{0&PJkxOfY}2L)3#JP6((0ZcR{1vJu9 zKtTmh8Wp_67!xJ2rRht3fj4<*ip2;q_#lwf#5Qb8F>PwMb3Er;N;GkkZ)fJ4@BF@V z{^y);ZWK?ye&Gc(%t8lJL;V9=hRm%rHWRbD#a&8ntqS=EAu zqH6F=RY6uX4TGU@ndiEB@?2E|nT%Hbv1GEhx>0h$*6MuWD7{B>KvB^jP>`?h@{BD& ze_mO}+H5@rf(e|NnK6~iWm5@$sJ{ge!o(Vh#;~jFAolh3VKf#)pX|ruaL~yie(s!EGF$H| zNFLblib39$sOx19tJbV(!KtY!yf8S3$z&4U9uInbK7j~OEJt9EYZ+nsT(cF78&TM#4iGP1yoiSm9m1VEcVcT>8_MLF+v627 zu_0mNQfcUn+bY?+Icpv$c(zzwiWUUf)3{O4?Xo|B8`|6P{Q2`ZK0b~M3kzr%hS-5~ zYq%B{7mZS>gqJQ|GI%eAQsDK;2yc19(iEKY%vbPcSm)g=IU(k4*m#5;FjIQ5x3?E( zXJ@g8iCzZMDAQQ{*VW)XhK7bPo6QP|;2p0@?6cl`b~ZGbq1Cq?a=z%374p%ey)-R; zh9FCHFUaikf{FeXIcCFl`SNAd^%Tm106LsbT$x{mS~QK*UxQDoz%9@$7bO`E$U0=@ z#KVQAW+A~b0wALdhAuw1L!pcH@ZrM-7tw#H@Tq)X4hyvTH&Zer{(Pac^8lV;ny?fO z+nGB$I%-fK7!IckAIdiy>==n}nu1UK<%+5nXbrSi`&dfS6heVQ9ZSk7`hbbHYuBz3 zBT5Xnk!xIuN<_cUI2(AtSgRDNJl|GA(5NIbj}(jep)e+tL5*ZMT^_7&XdvSxR{%Ni znKHZNz$$e|m4`hy*&(m0E3{w;`}_OxeMZ=C-MWo6nG9iqhTG#avbmhV%+Jqr9BQdj z+ZM=aMac_JEuZA#h$oUbFff288B%@a$`x!P*+t#%)56phr?ly~*wo@zqnNJAir!c0 zFH?`M_YpK;O&Z=W{^Yek^}w<*0=QVJ}y>1m9D{-)>iE7>=coYjEvye*cc8E4`X*v z4{qGFi8QE1R;CBGgd*hsp3s+)2F~yn#l!*VsTvW$afb4IJ4}WmI`E^-Pi0hFSBDzO zKRG#RV(qvN?m$QQ8%YHt{J3ILLs86RYX#*5oALZQ_&vNt;a1Kp`#;JPk=tRRrCANd za2f6N;2c$;6lsB}I94kf<)b(5Cxjunh7|(B@`wXjfuEzz zFc3}XX9S4F=HqC2ZY7DG!nwIQ6SX;sEyu2zIKf~n{u_OV1`~h7`s6+y(p?x#eqj@b1pJyjKp(B`x>u5VpsYU+ W6M7d->`u{FES7$n2d#f2{pvpi)jN>@ delta 396 zcmbPGaLai^G!xr@AYeE#xu5wogt>O}K^A647(17Z1@Rs?3x>d7`@KOw@aCo@Vw z4PUc(lO)_BCDL#OlCpnbYIn)Onc)ghgI7=fruYtK-BjfdFs6g*BN+3c+I&XA$&KpX z%>NlyP7c#p$|x}TkA^##cTy9s%t-qdOviMcr!c0Z-U