From 5fa349b6ffd13abe3e368b08d4344a1c2c876a8c Mon Sep 17 00:00:00 2001 From: Tercio Date: Mon, 17 Aug 2015 17:28:13 -0300 Subject: [PATCH] - PLugins Update. --- boot.lua | 4 +- .../Details_EncounterDetails.lua | 87 +++++- plugins/Details_EncounterDetails/frames.lua | 110 +++++++ .../Details_RaidInfo-HellfireCitadel.lua | 281 +++++++++--------- 4 files changed, 338 insertions(+), 144 deletions(-) diff --git a/boot.lua b/boot.lua index ce2871af..5cbf7a45 100644 --- a/boot.lua +++ b/boot.lua @@ -4,7 +4,7 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") _detalhes.build_counter = 1382 --it's 1382 for release - _detalhes.userversion = "v3.18.4" + _detalhes.userversion = "v3.18.4a" _detalhes.realversion = 74 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" Details = _detalhes @@ -40,7 +40,7 @@ do -- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.18.4 (|cFFFFCC00Aug 17, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Improvements on Weakauras creation from Encounter Details plugin.\n\n|cFFFFFF00-|r Improvements on 'Auto Switch to Current' feature. Details! windows are now more responsible about auto changing a segment while the player, for instance, has the report window opened.\n\n|cFFFFFF00-|r Added slash command '/de wipe'. It ends the raid encounter segment and stop capturing data.\nIf you are the raid leader, all other users of Details! will also stop.\nWorks great for players not make damage padding after a wipe call.\n\n|cFFFFFF00-|r Added an option to disable stretch button and bar highlight.\n\n|cFFFFFF00-|r Disabling nicknames now also disable avatars.\n\n|cFFFFFF00-|r Added 'spinal healing injector' on custom display 'Health Potion & Stone' used.\n\n|cFFFFFF00-|r Fixed title text width when auto-hide menu buttons is enabled.\n\n|cFFFFFF00-|r Fixed item level of timewarped items.\n\n|cFFFFFF00-|r Fixed report for custom display Crowd Control.\n\n|cFFFFFF00-|r Fixed role icons on custom displays.\n\n|cFFFFFF00-|r Fixed an issue with dropdown boxes where wasn't showing all options.\n\n|cFFFFFF00-|r Fixed Ticket #53: background alpha after stretching which wasn't correctly coming back to original color.\n\n|cFFFFFF00-|r Fixed ticket #51: API Call 'GetCombat('overall')' wasn't returning the overall combat object.\n\n|cFFFFFF00-|r Fixed ticket #50: issue opening icon selection frame.\n\n|cFFFFFF00v3.17.12 (|cFFFFCC00Aug 05, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option for lock micro displays. When locked they don't interact with mouse or stay on top of menus.\n\n|cFFFFFF00-|r Fixed ticket #49: death display not working correctly with sort direction bottom-to-top.\n\n|cFFFFFF00-|r Fixed an issue with death display where the text wasn't updating their width correctly.\n\n|cFFFFFF00-|r Fixed an issue with energy and miscellaneous displays type not working correctly with bar animations.\n\n|cFFFFFF00-|r Fixed an issue while loading old profiles wans't updating their values for newer versions of the addon.\n\n|cFFFFFF00-|r Fixed an issue with bookmarks panel not opening correctly.\n\n|cFFFFFF00v3.17.10 (|cFFFFCC00Aug 02, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed ticket #47: Title bar font resets with UI reload / relog.\n\n|cFFFFFF00-|r Fixed ticket #46: Icon select panel wasn't opening.\n\n|cFFFFFF00-|r Fixed ticket #45: Windwalker icon for Mistweaver monks.\n\n|cFFFFFF00-|r Fixed issue with vehicles exchanging ownership, e.g. Soulbound Constructor on HFC raid.\n\n|cFFFFFF00v3.17.6 (|cFFFFCC00Jul 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Major improvements on the aura tool creation for WeakAuras.\n\n|cFFFFFF00-|r Fixed some issues with spec icons where sometimes it shows four small icons.\n\n|cFFFFFF00-|r Added an option to show a stopwatch on the title text showing the elapsed time of an encounter.\n\n|cFFFFFF00-|r Window title text now shrinks correctly when isn't enough space for it.\n\n|cFFFFFF00-|r For some special cases, left click now open the report window and shift+click shows the tooltip content in the window.\n\n|cFFFFFF00-|r Damage Taken by Spells now are a part of Damage bracket (no more on custom).\n\n|cFFFFFF00-|r Fixed custom functions for the customized bar left text.\n\n|cFFFFFF00-|r Improvements on report text format and also reverse option now works as intended.\n\n|cFFFFFF00-|r Removed the option for report only what is shown in the window.\n\n|cFFFFFF00-|r Added skins for report panel, the skin follow the skin selected for Player Detail Window.\n\n|cFFFFFF00v3.16.0c (|cFFFFCC00Jul 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with Encounter Details graphic for Archimonde encounter.\n\n|cFFFFFF00-|r Numbers format on Player Detail Window now respect the format chosen on options panel.\n\n|cFFFFFF00-|r Removed pet icons on Player Detail Window.\n\n|cFFFFFF00-|r Fixed some wrong textures on spec icons.\n\n|cFFFFFF00-|r Improvements on all skins for the Player Detail Window.\n\n|cFFFFFF00v3.15.8b (|cFFFFCC00Jul 01, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Soul Capacitor trinket fix.\n\n|cFFFFFF00-|r Fixed several small bugs from 6.2 patch.\n\n|cFFFFFF00-|r Disabled the special behavior for Tyrant Velhari encounter.\n\n|cFFFFFF00v3.15.7 (|cFFFFCC00Jun 23, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added support for Hellfire Citadel raid.\n\n|cFFFFFF00-|r Added support for custom CLEU parser functions.\n\n|cFFFFFF00-|r Tyrant Velhari encounter now has a custom CLEU parser function for healing where the heal absorbed by Aura of Contempt will count towards overheal and not healing done.\n\n|cFFFFFF00-|r Added support for embed on Chat Tabs.\n\n|cFFFFFF00-|r |cFFAAFFAAPS: We've made an addon for Shadow-Lord Iskar encounter called 'Iskar Assist' check it out|r.\n\n|cFFFFFF00v3.15.5a (|cFFFFCC00Jun 12, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue where sometimes tooltips wasn't being shown.\n\n|cFFFFFF00-|r Fixed a problem with overall data where it was using, even on dungoens, the raid-only 30 delay rule.\n\n|cFFFFFF00-|r Fixed an issue with spec detection (now it may detect even faster).\n\n|cFFFFFF00v3.15.5 (|cFFFFCC00Jun 09, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed a problem with auto hide feature not hiding plugins hosted by the window.\n\n|cFFFFFF00-|r Fixed an issue with stretch feature when the anchor button was anchored at the bottom side of the window.\n\n|cFFFFFF00-|r Small interface tweaks on tooltips, bookmark and player detail window.\n\n|cFFFFFF00-|r Custom display 'My Spells' now also show amount of casts and uptime.\n\n|cFFFFFF00-|r Added an extra tooltip for the class icon at the player's bar.\n\n|cFFFFFF00-|r Activity time now has only 3 seconds inactivity tolerance on battlegrounds and arenas.\n\n|cFFFFFF00-|r Effective time will automatically be used when inside a battleground and using sync from the score board.\n\n|cFFFFFF00-|r Added 'hide all' option on the minimap menu.\n\n|cFFFFFF00-|r Added support for battlegrounds.\n\n|cFFFFFF00-|r Added option for disable showing battleground enemies when the window is in group mode.\n\n|cFFFFFF00-|r Added option to disable the sync from battleground score board.\n\n|cFFFFFF00-|r Enemies from a battleground match segment won't be erased when the player logout.\n\n|cFFFFFF00v3.14.4 (|cFFFFCC00May 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r TimeLine (plugin): now also shows marks symbolizing the player death.\n\n|cFFFFFF00-|r Added raid history panel. Open it through bookmark or /details history.\n\n|cFFFFFF00-|r Added support for skins for Player Detail Window.\n\n|cFFFFFF00-|r Added report history on report button.\n\n|cFFFFFF00-|r Added key bindings settings for report what is shown on window #1 or #2.\n\n|cFFFFFF00v3.14.0b (|cFFFFCC00May 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Several texture changes for a smaller download size.\n\n|cFFFFFF00v3.13.4a (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Created 'Details! Forge' but is still under development: /details forge.\n\n|cFFFFFF00-|r Several improvements on combatlog reader and custom displays.\n\n|cFFFFFF00-|r Improvements on enemies damage taken tooltip.\n\n|cFFFFFF00v3.13.1 (|cFFFFCC00April 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added casted amount for healing and damage spells. The result is shown on Player Detail Window and Comparison Panel.\n\n|cFFFFFF00-|r Added uptime amount for healing spells on Player Detail Window.\n\n|cFFFFFF00-|r Added an option to disable lock/resize/ungroup buttons. It's under miscellaneous bracket on Options Panel." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.18.4a (|cFFFFCC00Aug 17, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Improvements on Weakauras creation from Encounter Details plugin.\n\n|cFFFFFF00-|r Improvements on 'Auto Switch to Current' feature. Details! windows are now more responsible about auto changing a segment while the player, for instance, has the report window opened.\n\n|cFFFFFF00-|r Added slash command '/de wipe'. It ends the raid encounter segment and stop capturing data.\nIf you are the raid leader, all other users of Details! will also stop.\nWorks great for players not make damage padding after a wipe call.\n\n|cFFFFFF00-|r Added an option to disable stretch button and bar highlight.\n\n|cFFFFFF00-|r Disabling nicknames now also disable avatars.\n\n|cFFFFFF00-|r Added 'spinal healing injector' on custom display 'Health Potion & Stone' used.\n\n|cFFFFFF00-|r Fixed title text width when auto-hide menu buttons is enabled.\n\n|cFFFFFF00-|r Fixed item level of timewarped items.\n\n|cFFFFFF00-|r Fixed report for custom display Crowd Control.\n\n|cFFFFFF00-|r Fixed role icons on custom displays.\n\n|cFFFFFF00-|r Fixed an issue with dropdown boxes where wasn't showing all options.\n\n|cFFFFFF00-|r Fixed Ticket #53: background alpha after stretching which wasn't correctly coming back to original color.\n\n|cFFFFFF00-|r Fixed ticket #51: API Call 'GetCombat('overall')' wasn't returning the overall combat object.\n\n|cFFFFFF00-|r Fixed ticket #50: issue opening icon selection frame.\n\n|cFFFFFF00v3.17.12 (|cFFFFCC00Aug 05, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option for lock micro displays. When locked they don't interact with mouse or stay on top of menus.\n\n|cFFFFFF00-|r Fixed ticket #49: death display not working correctly with sort direction bottom-to-top.\n\n|cFFFFFF00-|r Fixed an issue with death display where the text wasn't updating their width correctly.\n\n|cFFFFFF00-|r Fixed an issue with energy and miscellaneous displays type not working correctly with bar animations.\n\n|cFFFFFF00-|r Fixed an issue while loading old profiles wans't updating their values for newer versions of the addon.\n\n|cFFFFFF00-|r Fixed an issue with bookmarks panel not opening correctly.\n\n|cFFFFFF00v3.17.10 (|cFFFFCC00Aug 02, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed ticket #47: Title bar font resets with UI reload / relog.\n\n|cFFFFFF00-|r Fixed ticket #46: Icon select panel wasn't opening.\n\n|cFFFFFF00-|r Fixed ticket #45: Windwalker icon for Mistweaver monks.\n\n|cFFFFFF00-|r Fixed issue with vehicles exchanging ownership, e.g. Soulbound Constructor on HFC raid.\n\n|cFFFFFF00v3.17.6 (|cFFFFCC00Jul 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Major improvements on the aura tool creation for WeakAuras.\n\n|cFFFFFF00-|r Fixed some issues with spec icons where sometimes it shows four small icons.\n\n|cFFFFFF00-|r Added an option to show a stopwatch on the title text showing the elapsed time of an encounter.\n\n|cFFFFFF00-|r Window title text now shrinks correctly when isn't enough space for it.\n\n|cFFFFFF00-|r For some special cases, left click now open the report window and shift+click shows the tooltip content in the window.\n\n|cFFFFFF00-|r Damage Taken by Spells now are a part of Damage bracket (no more on custom).\n\n|cFFFFFF00-|r Fixed custom functions for the customized bar left text.\n\n|cFFFFFF00-|r Improvements on report text format and also reverse option now works as intended.\n\n|cFFFFFF00-|r Removed the option for report only what is shown in the window.\n\n|cFFFFFF00-|r Added skins for report panel, the skin follow the skin selected for Player Detail Window.\n\n|cFFFFFF00v3.16.0c (|cFFFFCC00Jul 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with Encounter Details graphic for Archimonde encounter.\n\n|cFFFFFF00-|r Numbers format on Player Detail Window now respect the format chosen on options panel.\n\n|cFFFFFF00-|r Removed pet icons on Player Detail Window.\n\n|cFFFFFF00-|r Fixed some wrong textures on spec icons.\n\n|cFFFFFF00-|r Improvements on all skins for the Player Detail Window.\n\n|cFFFFFF00v3.15.8b (|cFFFFCC00Jul 01, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Soul Capacitor trinket fix.\n\n|cFFFFFF00-|r Fixed several small bugs from 6.2 patch.\n\n|cFFFFFF00-|r Disabled the special behavior for Tyrant Velhari encounter.\n\n|cFFFFFF00v3.15.7 (|cFFFFCC00Jun 23, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added support for Hellfire Citadel raid.\n\n|cFFFFFF00-|r Added support for custom CLEU parser functions.\n\n|cFFFFFF00-|r Tyrant Velhari encounter now has a custom CLEU parser function for healing where the heal absorbed by Aura of Contempt will count towards overheal and not healing done.\n\n|cFFFFFF00-|r Added support for embed on Chat Tabs.\n\n|cFFFFFF00-|r |cFFAAFFAAPS: We've made an addon for Shadow-Lord Iskar encounter called 'Iskar Assist' check it out|r.\n\n|cFFFFFF00v3.15.5a (|cFFFFCC00Jun 12, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue where sometimes tooltips wasn't being shown.\n\n|cFFFFFF00-|r Fixed a problem with overall data where it was using, even on dungoens, the raid-only 30 delay rule.\n\n|cFFFFFF00-|r Fixed an issue with spec detection (now it may detect even faster).\n\n|cFFFFFF00v3.15.5 (|cFFFFCC00Jun 09, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed a problem with auto hide feature not hiding plugins hosted by the window.\n\n|cFFFFFF00-|r Fixed an issue with stretch feature when the anchor button was anchored at the bottom side of the window.\n\n|cFFFFFF00-|r Small interface tweaks on tooltips, bookmark and player detail window.\n\n|cFFFFFF00-|r Custom display 'My Spells' now also show amount of casts and uptime.\n\n|cFFFFFF00-|r Added an extra tooltip for the class icon at the player's bar.\n\n|cFFFFFF00-|r Activity time now has only 3 seconds inactivity tolerance on battlegrounds and arenas.\n\n|cFFFFFF00-|r Effective time will automatically be used when inside a battleground and using sync from the score board.\n\n|cFFFFFF00-|r Added 'hide all' option on the minimap menu.\n\n|cFFFFFF00-|r Added support for battlegrounds.\n\n|cFFFFFF00-|r Added option for disable showing battleground enemies when the window is in group mode.\n\n|cFFFFFF00-|r Added option to disable the sync from battleground score board.\n\n|cFFFFFF00-|r Enemies from a battleground match segment won't be erased when the player logout.\n\n|cFFFFFF00v3.14.4 (|cFFFFCC00May 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r TimeLine (plugin): now also shows marks symbolizing the player death.\n\n|cFFFFFF00-|r Added raid history panel. Open it through bookmark or /details history.\n\n|cFFFFFF00-|r Added support for skins for Player Detail Window.\n\n|cFFFFFF00-|r Added report history on report button.\n\n|cFFFFFF00-|r Added key bindings settings for report what is shown on window #1 or #2.\n\n|cFFFFFF00v3.14.0b (|cFFFFCC00May 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Several texture changes for a smaller download size.\n\n|cFFFFFF00v3.13.4a (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Created 'Details! Forge' but is still under development: /details forge.\n\n|cFFFFFF00-|r Several improvements on combatlog reader and custom displays.\n\n|cFFFFFF00-|r Improvements on enemies damage taken tooltip.\n\n|cFFFFFF00v3.13.1 (|cFFFFCC00April 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added casted amount for healing and damage spells. The result is shown on Player Detail Window and Comparison Panel.\n\n|cFFFFFF00-|r Added uptime amount for healing spells on Player Detail Window.\n\n|cFFFFFF00-|r Added an option to disable lock/resize/ungroup buttons. It's under miscellaneous bracket on Options Panel." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/plugins/Details_EncounterDetails/Details_EncounterDetails.lua b/plugins/Details_EncounterDetails/Details_EncounterDetails.lua index 21fadec8..9545f93e 100644 --- a/plugins/Details_EncounterDetails/Details_EncounterDetails.lua +++ b/plugins/Details_EncounterDetails/Details_EncounterDetails.lua @@ -104,20 +104,14 @@ local function CreatePluginFrames (data) end local damage_done_func = function (support_table, time_table, tick_second) - local current_total_damage = _detalhes.tabela_vigente.totals_grupo[1] - local current_damage = current_total_damage - support_table.last_damage - time_table [tick_second] = current_damage - if (current_damage > support_table.max_damage) then support_table.max_damage = current_damage time_table.max_damage = current_damage end - support_table.last_damage = current_total_damage - end local string_damage_done_func = [[ @@ -147,6 +141,8 @@ local function CreatePluginFrames (data) elseif (EncounterDetails.db.show_icon == 5) then EncounterDetails:AutoShowIcon() end + + EncounterDetails:CreateCallbackListeners() elseif (event == "COMBAT_PLAYER_ENTER") then --> combat started if (EncounterDetails.showing and EncounterDetails.db.hide_on_combat) then @@ -236,6 +232,83 @@ local function CreatePluginFrames (data) end end + function EncounterDetails:CreateCallbackListeners() + + EncounterDetails.DBM_timers = {} + + local current_encounter = false + + local current_table_dbm = {} + local current_table_bigwigs = {} + + local event_frame = CreateFrame ("frame", nil, UIParent) + event_frame:SetScript ("OnEvent", function (self, event, ...) + if (event == "ENCOUNTER_START") then + local encounterID, encounterName, difficultyID, raidSize = select (1, ...) + current_encounter = encounterID + + elseif (event == "ENCOUNTER_END" or event == "PLAYER_REGEN_ENABLED") then + if (current_encounter) then + if (_G.DBM) then + for spell, timer_table in pairs (current_table_dbm) do + if (not EncounterDetails.db.encounter_timers_dbm [timer_table[1]] and timer_table[1]:find ("Timer")) then + timer_table.id = current_encounter + EncounterDetails.db.encounter_timers_dbm [timer_table[1]] = timer_table + end + end + end + if (BigWigs) then + for timer_id, timer_table in pairs (current_table_bigwigs) do + if (not EncounterDetails.db.encounter_timers_bw [timer_id]) then + timer_table.id = current_encounter + EncounterDetails.db.encounter_timers_bw [timer_id] = timer_table + end + end + end + end + + current_encounter = false + wipe (current_table_dbm) + wipe (current_table_bigwigs) + end + end) + event_frame:RegisterEvent ("ENCOUNTER_START") + event_frame:RegisterEvent ("ENCOUNTER_END") + event_frame:RegisterEvent ("PLAYER_REGEN_ENABLED") + + --EncounterDetails.DBM_timers + + if (_G.DBM) then + local dbm_timer_callback = function (event, timer_id, message, duration) + local spell = tonumber (timer_id:match ("(%d+)")) + if (spell and not current_table_dbm [spell]) then + current_table_dbm [spell] = {timer_id, message, duration} + end + end + DBM:RegisterCallback ("DBM_TimerStart", dbm_timer_callback) + end + function EncounterDetails:RegisterBigWigsCallBack() + if (BigWigs) then + BigWigs:Enable() + function EncounterDetails:BigWigs_StartBar (event, module, spellid, bar_text, time, icon, ...) + spellid = tostring (spellid) + if (not current_table_bigwigs [spellid]) then + current_table_bigwigs [spellid] = {spellid, bar_text, time, icon} + end + end + BigWigs.RegisterMessage (EncounterDetails, "BigWigs_StartBar") + end + end + EncounterDetails:ScheduleTimer ("RegisterBigWigsCallBack", 5) + +--BigWigs_StartBar BigWigs_Bosses_Brackenspore mind_fungus Mind Fungus 51 Interface\Icons\inv_mushroom_10 true +--bigwigs startbar mind_fungus + +--BigWigs_StartBar BigWigs_Bosses_Brackenspore 159996 Infesting Spores (2) 58 Interface\Icons\Ability_Creature_Disease_01 +--bigwigs startbar 160013 + + end + function EncounterDetails:WasEncounter() --> check if last combat was a boss encounter fight @@ -1735,6 +1808,8 @@ function EncounterDetails:OnEvent (_, event, ...) hide_on_combat = false, --hide the window when a new combat start max_emote_segments = 3, opened = 0, + encounter_timers_dbm = {}, + encounter_timers_bw = {}, } --> Install diff --git a/plugins/Details_EncounterDetails/frames.lua b/plugins/Details_EncounterDetails/frames.lua index 9ec2f288..6391f3c1 100644 --- a/plugins/Details_EncounterDetails/frames.lua +++ b/plugins/Details_EncounterDetails/frames.lua @@ -1106,6 +1106,9 @@ do end BossFrame.segmentosDropdown:Enable() + + BossFrame.DBMBars:Refresh() + BossFrame.BigWigsBars:Refresh() elseif (to == "emotes") then @@ -1905,6 +1908,107 @@ do npc_id2:SetPoint ("left", npc_id, "right", 2, 0) npc_id2:Hide() + -- + local label_dbm_bars = DetailsFrameWork:CreateLabel (BossFrame, "DBM Bars:", 11, nil, "GameFontHighlightSmall") + label_dbm_bars:SetPoint ("topleft", BossFrame, "topleft", 25, -160) + local label_bw_bars = DetailsFrameWork:CreateLabel (BossFrame, "Big Wigs Bars:", 11, nil, "GameFontHighlightSmall") + label_bw_bars:SetPoint ("topleft", BossFrame, "topleft", 25, -205) + + local on_select_dbm_bar = function (_, _, timer_id) + local timer_table = EncounterDetails.db.encounter_timers_dbm [timer_id] + local spell = tonumber (timer_id:match ("(%d+)")) + + if (spell > 30000) then + local spellname, _, spellicon = _GetSpellInfo (spell) + EncounterDetails:OpenAuraPanel (spell, spellname, spellicon, timer_table.id, DETAILS_WA_TRIGGER_DBM_TIMER, DETAILS_WA_AURATYPE_TEXT, {dbm_timer_id = timer_id, text = "== Next " .. spellname .. " In ==", text_size = 72}) + else + local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = EJ_GetSectionInfo (spell) + EncounterDetails:OpenAuraPanel (spell, title, abilityIcon, timer_table.id, DETAILS_WA_TRIGGER_DBM_TIMER, DETAILS_WA_AURATYPE_TEXT, {dbm_timer_id = timer_id, text = "== Next " .. title .. " In ==", text_size = 72}) + end + end + + local on_select_bw_bar = function (_, _, timer_id) + local timer_table = EncounterDetails.db.encounter_timers_bw [timer_id] + local spell = timer_id + local int_spell = tonumber (spell) + + if (not int_spell) then + local spellname = timer_table [2]:gsub (" %(.%)", "") + EncounterDetails:OpenAuraPanel (spell, spellname, timer_table [4], timer_table.id, DETAILS_WA_TRIGGER_BW_TIMER, DETAILS_WA_AURATYPE_TEXT, {bw_timer_id = timer_id, text = "== Next " .. spellname .. " In ==", text_size = 72}) + elseif (int_spell < 0) then + local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = EJ_GetSectionInfo (abs (int_spell)) + EncounterDetails:OpenAuraPanel (spell, title, abilityIcon, timer_table.id, DETAILS_WA_TRIGGER_BW_TIMER, DETAILS_WA_AURATYPE_TEXT, {bw_timer_id = timer_id, text = "== Next " .. title .. " In ==", text_size = 72}) + else + local spellname, _, spellicon = _GetSpellInfo (int_spell) + EncounterDetails:OpenAuraPanel (spell, spellname, spellicon, timer_table.id, DETAILS_WA_TRIGGER_BW_TIMER, DETAILS_WA_AURATYPE_TEXT, {bw_timer_id = timer_id, text = "== Next " .. spellname .. " In ==", text_size = 72}) + end + end + + local already_added = {} + local build_dbm_bars = function() + local t = {} + if (EncounterDetails.db) then + wipe (already_added) + local encounter_id = EncounterDetails_SpellAurasScroll.encounter_id + + for timer_id, timer_table in pairs (EncounterDetails.db.encounter_timers_dbm) do + if (timer_id:find ("Timer") and timer_table.id == encounter_id) then + local spell = tonumber (timer_id:match ("(%d+)")) + if (spell and not already_added [spell]) then + if (spell > 30000) then + local spellname, _, spellicon = _GetSpellInfo (spell) + tinsert (t, {label = spellname, value = timer_id, icon = spellicon, onclick = on_select_dbm_bar}) + else + local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = EJ_GetSectionInfo (spell) + tinsert (t, {label = title, value = timer_id, icon = abilityIcon, onclick = on_select_dbm_bar}) + end + + already_added [spell] = true + end + end + end + end + return t + end + + local build_bigwigs_bars = function() + local t = {} + if (EncounterDetails.db) then + wipe (already_added) + local encounter_id = EncounterDetails_SpellAurasScroll.encounter_id + + for timer_id, timer_table in pairs (EncounterDetails.db.encounter_timers_bw) do + if (timer_table.id == encounter_id) then + local spell = timer_id + if (spell and not already_added [spell]) then + local int_spell = tonumber (spell) + if (not int_spell) then + local spellname = timer_table [2]:gsub (" %(.%)", "") + tinsert (t, {label = spellname, value = timer_id, icon = timer_table [4], onclick = on_select_bw_bar}) + elseif (int_spell < 0) then + local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = EJ_GetSectionInfo (abs (int_spell)) + tinsert (t, {label = title, value = timer_id, icon = abilityIcon, onclick = on_select_bw_bar}) + else + local spellname, _, spellicon = _GetSpellInfo (int_spell) + tinsert (t, {label = spellname, value = timer_id, icon = spellicon, onclick = on_select_bw_bar}) + end + + already_added [spell] = true + end + end + end + end + return t + end + + local dropdown_dbm_bars = DetailsFrameWork:NewDropDown (BossFrame, _, "$parentDBMBarsDropdown", "DBMBars", 160, 20, build_dbm_bars, 1) + dropdown_dbm_bars:SetPoint ("topleft", label_dbm_bars, "bottomleft", -1, -2) + + local dropdown_bw_bars = DetailsFrameWork:NewDropDown (BossFrame, _, "$parentBigWigsBarsDropdown", "BigWigsBars", 160, 20, build_bigwigs_bars, 1) + dropdown_bw_bars:SetPoint ("topleft", label_bw_bars, "bottomleft", -1, -2) + + -- + tinsert (BossFrame.EnemySpellsWidgets, EnemyActorSpells_label) tinsert (BossFrame.EnemySpellsWidgets, EnemyActorSpells) tinsert (BossFrame.EnemySpellsWidgets, bar_div) @@ -2441,6 +2545,12 @@ do tinsert (EncounterDetails.current_whisper_table, {combat:GetCombatTime(), arg3, arg4, emote_table [arg2]}) end end) + +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + + end end +--endd \ No newline at end of file diff --git a/plugins/Details_RaidInfo-HellfireCitadel/Details_RaidInfo-HellfireCitadel.lua b/plugins/Details_RaidInfo-HellfireCitadel/Details_RaidInfo-HellfireCitadel.lua index 430a1055..df58bc46 100644 --- a/plugins/Details_RaidInfo-HellfireCitadel/Details_RaidInfo-HellfireCitadel.lua +++ b/plugins/Details_RaidInfo-HellfireCitadel/Details_RaidInfo-HellfireCitadel.lua @@ -1,146 +1,155 @@ do ---load encounter journal -if (not EJ_GetEncounterInfoByIndex (1, 669)) then - EJ_SelectInstance (669) -end + function Details:InstallHellfireCitadelEncounter() -local InstanceName = EJ_GetInstanceInfo (669) + --load encounter journal + if (not EJ_GetEncounterInfoByIndex (1, 669)) then + EJ_SelectInstance (669) + end + EJ_SelectInstance (669) -local boss_1_name = EJ_GetEncounterInfoByIndex (1, 669) -local boss_2_name = EJ_GetEncounterInfoByIndex (2, 669) -local boss_3_name = EJ_GetEncounterInfoByIndex (3, 669) -local boss_4_name = EJ_GetEncounterInfoByIndex (4, 669) -local boss_5_name = EJ_GetEncounterInfoByIndex (5, 669) -local boss_6_name = EJ_GetEncounterInfoByIndex (6, 669) -local boss_7_name = EJ_GetEncounterInfoByIndex (7, 669) -local boss_8_name = EJ_GetEncounterInfoByIndex (8, 669) -local boss_9_name = EJ_GetEncounterInfoByIndex (9, 669) -local boss_10_name = EJ_GetEncounterInfoByIndex (10, 669) -local boss_11_name = EJ_GetEncounterInfoByIndex (11, 669) -local boss_12_name = EJ_GetEncounterInfoByIndex (12, 669) -local boss_13_name = EJ_GetEncounterInfoByIndex (13, 669) + local InstanceName = EJ_GetInstanceInfo (669) -_detalhes:InstallEncounter ({ - - id = 1448, --map id - ej_id = 669, --encounter journal id - name = InstanceName, - icons = [[Interface\AddOns\Details_RaidInfo-HellfireCitadel\boss_faces]], - icon = [[Interface\AddOns\Details_RaidInfo-HellfireCitadel\icon256x128]], - is_raid = true, - backgroundFile = {file = [[Interface\Glues\LOADINGSCREENS\LoadScreen_HellfireRaid]], coords = {0, 1, 296/1024, 880/1024}}, - backgroundEJ = [[Interface\EncounterJournal\UI-EJ-LOREBG-HellfireRaid]], - -- - boss_names = { - boss_1_name, --"Hellfire Assault" - boss_2_name, --"Iron Reaver" - boss_3_name, --"Kormrok" - boss_4_name, --"Hellfire High Council" - boss_5_name, --"Kilrogg Deadeye" - boss_6_name, --"Gorefiend" - boss_7_name, --"Shadow-Lord Iskar" - boss_8_name, --"Socrethar the Eternal" - boss_9_name, --"Fel Lord Zakuun" - boss_10_name, --"Xhul'horac" - boss_11_name, --"Tyrant Velhari" - boss_12_name, --"Mannoroth" - boss_13_name, --"Archimonde" - }, - - encounter_ids = { --encounter journal encounter id - 1426,1425,1392,1432,1396,1372,1433,1427,1391,1447,1394,1395,1438, - [1426] = 1, - [1425] = 2, - [1392] = 3, - [1432] = 4, - [1396] = 5, - [1372] = 6, - [1433] = 7, - [1427] = 8, - [1391] = 9, - [1447] = 10, - [1394] = 11, - [1395] = 12, - [1438] = 13, - }, - - encounter_ids2 = { --combatlog encounter id - [1778] = 1, --"Hellfire Assault" - [1785] = 2, --"Iron Reaver" - [1787] = 3, --"Kormrok" - [1798] = 4, --"Hellfire High Council" - [1786] = 5, --"Kilrogg Deadeye" - [1783] = 6, --"Gorefiend" - [1788] = 7, --"Shadow-Lord Iskar" - [1794] = 8, --"Socrethar the Eternal" - [1777] = 9, --"Fel Lord Zakuun" - [1800] = 10, --"Xhul'horac" - [1784] = 11, --"Tyrant Velhari" - [1795] = 12, --"Mannoroth" - [1799] = 13, --"Archimonde" - }, - - boss_ids = { --npc ids + local boss_1_name = EJ_GetEncounterInfoByIndex (1, 669) + local boss_2_name = EJ_GetEncounterInfoByIndex (2, 669) + local boss_3_name = EJ_GetEncounterInfoByIndex (3, 669) + local boss_4_name = EJ_GetEncounterInfoByIndex (4, 669) + local boss_5_name = EJ_GetEncounterInfoByIndex (5, 669) + local boss_6_name = EJ_GetEncounterInfoByIndex (6, 669) + local boss_7_name = EJ_GetEncounterInfoByIndex (7, 669) + local boss_8_name = EJ_GetEncounterInfoByIndex (8, 669) + local boss_9_name = EJ_GetEncounterInfoByIndex (9, 669) + local boss_10_name = EJ_GetEncounterInfoByIndex (10, 669) + local boss_11_name = EJ_GetEncounterInfoByIndex (11, 669) + local boss_12_name = EJ_GetEncounterInfoByIndex (12, 669) + local boss_13_name = EJ_GetEncounterInfoByIndex (13, 669) + + _detalhes:InstallEncounter ({ + + id = 1448, --map id + ej_id = 669, --encounter journal id + name = InstanceName, + icons = [[Interface\AddOns\Details_RaidInfo-HellfireCitadel\boss_faces]], + icon = [[Interface\AddOns\Details_RaidInfo-HellfireCitadel\icon256x128]], + is_raid = true, + backgroundFile = {file = [[Interface\Glues\LOADINGSCREENS\LoadScreen_HellfireRaid]], coords = {0, 1, 296/1024, 880/1024}}, + backgroundEJ = [[Interface\EncounterJournal\UI-EJ-LOREBG-HellfireRaid]], + -- + boss_names = { + boss_1_name, --"Hellfire Assault" + boss_2_name, --"Iron Reaver" + boss_3_name, --"Kormrok" + boss_4_name, --"Hellfire High Council" + boss_5_name, --"Kilrogg Deadeye" + boss_6_name, --"Gorefiend" + boss_7_name, --"Shadow-Lord Iskar" + boss_8_name, --"Socrethar the Eternal" + boss_9_name, --"Fel Lord Zakuun" + boss_10_name, --"Xhul'horac" + boss_11_name, --"Tyrant Velhari" + boss_12_name, --"Mannoroth" + boss_13_name, --"Archimonde" + }, + + encounter_ids = { --encounter journal encounter id + 1426,1425,1392,1432,1396,1372,1433,1427,1391,1447,1394,1395,1438, + [1426] = 1, + [1425] = 2, + [1392] = 3, + [1432] = 4, + [1396] = 5, + [1372] = 6, + [1433] = 7, + [1427] = 8, + [1391] = 9, + [1447] = 10, + [1394] = 11, + [1395] = 12, + [1438] = 13, + }, + + encounter_ids2 = { --combatlog encounter id + [1778] = 1, --"Hellfire Assault" + [1785] = 2, --"Iron Reaver" + [1787] = 3, --"Kormrok" + [1798] = 4, --"Hellfire High Council" + [1786] = 5, --"Kilrogg Deadeye" + [1783] = 6, --"Gorefiend" + [1788] = 7, --"Shadow-Lord Iskar" + [1794] = 8, --"Socrethar the Eternal" + [1777] = 9, --"Fel Lord Zakuun" + [1800] = 10, --"Xhul'horac" + [1784] = 11, --"Tyrant Velhari" + [1795] = 12, --"Mannoroth" + [1799] = 13, --"Archimonde" + }, + + boss_ids = { --npc ids + + }, + encounters = { + [1] = { + boss = boss_1_name, --"Hellfire Assault" + portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-hellfireassault]], + }, + [2] = { + boss = boss_2_name, --"Iron Reaver", + portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-felreaver]], + }, + [3] = { + boss = boss_3_name, --"Kormrok", + portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-kormok]], + }, + [4] = { + boss = boss_4_name, --"Hellfire High Council", + portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-gurtoggbloodboil]], + }, + [5] = { + boss = boss_5_name, --"Kilrogg Deadeye", + portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-kilroggdeadeye]], + }, + [6] = { + boss = boss_6_name, --"Gorefiend", + portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-gorefiend]], + }, + [7] = { + boss = boss_7_name, --"Shadow-Lord Iskar", + portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-shadowlordiskar]], + }, + [8] = { + boss = boss_8_name, --"Socrethar the Eternal", + portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-soulboundconstruct]], + }, + [9] = { + boss = boss_9_name, --"Fel Lord Zakuun", + portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-FelLordZakuun]], + }, + [10] = { + boss = boss_10_name, --"Xhul'horac", + portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-xhulhorac]], + }, + [11] = { + boss = boss_11_name, --"Tyrant Velhari", + portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-tyrantvelhari]], + }, + [12] = { + boss = boss_12_name, --"Mannoroth", + portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-mannorothwod]], + }, + [13] = { + boss = boss_13_name, --"Archimonde", + portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-archimondewod]], + }, + }, + }) - }, - encounters = { - [1] = { - boss = boss_1_name, --"Hellfire Assault" - portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-hellfireassault]], - }, - [2] = { - boss = boss_2_name, --"Iron Reaver", - portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-felreaver]], - }, - [3] = { - boss = boss_3_name, --"Kormrok", - portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-kormok]], - }, - [4] = { - boss = boss_4_name, --"Hellfire High Council", - portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-gurtoggbloodboil]], - }, - [5] = { - boss = boss_5_name, --"Kilrogg Deadeye", - portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-kilroggdeadeye]], - }, - [6] = { - boss = boss_6_name, --"Gorefiend", - portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-gorefiend]], - }, - [7] = { - boss = boss_7_name, --"Shadow-Lord Iskar", - portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-shadowlordiskar]], - }, - [8] = { - boss = boss_8_name, --"Socrethar the Eternal", - portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-soulboundconstruct]], - }, - [9] = { - boss = boss_9_name, --"Fel Lord Zakuun", - portrait = [[Interface\ENCOUNTERJOURNAL\UI-EJ-BOSS-FelLordZakuun]], - }, - [10] = { - boss = boss_10_name, --"Xhul'horac", - portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-xhulhorac]], - }, - [11] = { - boss = boss_11_name, --"Tyrant Velhari", - portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-tyrantvelhari]], - }, - [12] = { - boss = boss_12_name, --"Mannoroth", - portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-mannorothwod]], - }, - [13] = { - boss = boss_13_name, --"Archimonde", - portrait = [[Interface\ENCOUNTERJOURNAL\ui-ej-boss-archimondewod]], - }, - }, -}) - + Details.InstallHellfireCitadelEncounter = nil + + end + + Details:ScheduleTimer ("InstallHellfireCitadelEncounter", 2) + end --> replacement for healing function: