From 0885e377b2478213714334cd52546cf1b63a28d2 Mon Sep 17 00:00:00 2001 From: Oleg Nechiporenko Date: Mon, 8 Aug 2022 14:43:47 +0300 Subject: [PATCH] * Add avoidable damage for SL s4 dungeons * Add avoidable debuffs for SL s4 dungeons * Add spells to interrupts for SL s4 dungeons * Add Dispel menu-item to WA-menu (page - Buffs and Debuffs on enemies) * Use correct spec ids for Enrage WA * Add WA-templates for spell cast start/success --- CHANGELOG.md | 6 + Core.lua | 6 + Locales/enUS.lua | 1 + Locales/ruRU.lua | 1 + Mechanics/Spells.lua | 236 +++++++++++++ MyDungeonsBook.toc | 5 +- .../Mechanics/Tabs/Casts/Tabs/Interrupts.lua | 3 +- .../Tabs/Casts/Tabs/OwnCastsByEnemies.lua | 4 +- .../Mechanics/Tabs/EffectsAndAuras/Tabs.lua | 7 +- .../Tabs/EffectsAndAuras/Tabs/AllDebuffs.lua | 164 ++++++++++ .../Tabs/BuffsOrDebuffsOnUnits.lua | 3 +- .../Tabs/EffectsAndAuras/Tabs/Dispels.lua | 3 +- .../WA/Auras/CustomActionOnSpellCastStart.lua | 309 ++++++++++++++++++ .../Auras/CustomActionOnSpellCastSuccess.lua | 260 +++++++++++++++ Utils/Integrations/WA/Auras/Dispel.lua | 68 +++- Utils/Integrations/WA/Auras/DispelEnemy.lua | 18 +- Utils/Integrations/WA/Auras/PartyAura.lua | 15 +- 17 files changed, 1078 insertions(+), 31 deletions(-) create mode 100644 UI/ChallengeDetails/Tabs/Mechanics/Tabs/EffectsAndAuras/Tabs/AllDebuffs.lua create mode 100644 Utils/Integrations/WA/Auras/CustomActionOnSpellCastStart.lua create mode 100644 Utils/Integrations/WA/Auras/CustomActionOnSpellCastSuccess.lua diff --git a/CHANGELOG.md b/CHANGELOG.md index 59cf4da..cef99b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ * Show dispel-type on the "Dispels"-tab * Save player's secondary stats changes * Add SL S4 affix "Shrouded" +* Add avoidable damage for SL s4 dungeons +* Add avoidable debuffs for SL s4 dungeons +* Add spells to interrupts for SL s4 dungeons +* Add Dispel menu-item to WA-menu (page - Buffs and Debuffs on enemies) +* Use correct spec ids for Enrage WA +* Add WA-templates for spell cast start/success ### v2.21.0 diff --git a/Core.lua b/Core.lua index d3dc014..1f6ba18 100644 --- a/Core.lua +++ b/Core.lua @@ -58,6 +58,12 @@ function MyDungeonsBook:OnInitialize() if (data.type == "PARTY_AURA") then MyDungeonsBook:WA_PartyAura_Aura_Create(data.auraData, data.instanceId, data.bossId, data.affixId, customText); end + if (data.type == "CUSTOM_ACTION_ON_SPELL_CAST_START") then + MyDungeonsBook:WA_CustomActionOnSpellStart_Aura_Create(data.auraData, data.instanceId, data.bossId, data.affixId, customText); + end + if (data.type == "CUSTOM_ACTION_ON_SPELL_CAST_SUCCESS") then + MyDungeonsBook:WA_CustomActionOnSpellSuccess_Aura_Create(data.auraData, data.instanceId, data.bossId, data.affixId, customText); + end end, whileDead = true, hideOnEscape = true, diff --git a/Locales/enUS.lua b/Locales/enUS.lua index 481a324..17b04f5 100644 --- a/Locales/enUS.lua +++ b/Locales/enUS.lua @@ -189,6 +189,7 @@ L["Weak Auras"] = "Weak Auras"; L["Kickable"] = "Kickable"; L["Secondaries"] = "Secondaries"; L["Personal"] = "Personal"; +L["All Debuffs"] = "All Debuffs"; -- UI end -- Help start diff --git a/Locales/ruRU.lua b/Locales/ruRU.lua index 8ccc870..4e2f5ec 100644 --- a/Locales/ruRU.lua +++ b/Locales/ruRU.lua @@ -190,6 +190,7 @@ L["Weak Auras"] = "Weak Auras"; L["Kickable"] = "Сбиваемо"; L["Secondaries"] = "Вторичные навыки"; L["Personal"] = "Личное"; +L["All Debuffs"] = "Все дебафы"; -- UI end -- Help start diff --git a/Mechanics/Spells.lua b/Mechanics/Spells.lua index ba251dc..5774807 100644 --- a/Mechanics/Spells.lua +++ b/Mechanics/Spells.lua @@ -11,6 +11,29 @@ local L = LibStub("AceLocale-3.0"):GetLocale("MyDungeonsBook"); local Spells = { + ----------------------------- + ---- Warlords of Draenor ---- + ----------------------------- + + -- Iron Docks + [164632] = true, + [165152] = true, -- Lava Sweep + [168148] = true, + [168390] = true, + [168514] = true, + [173349] = true, -- Trampled + [173517] = true, + [173489] = true, + + -- Grimrail Depot + [162513] = true, + [171902] = true, + [167038] = true, + [160963] = true, + [176025] = true, + [162065] = true, + [161588] = true, + ---------------- ---- LEGION ---- ---------------- @@ -80,6 +103,12 @@ local Spells = { [191743] = true, -- Deafening Screech [197541] = true, -- Detonation + -- Karazhan Lower + [228625] = true, + [228019] = true, + + -- Karazhan Upper + ------------- ---- BfA ---- ------------- @@ -294,6 +323,9 @@ local Spells = { [366409] = true, -- Fusion Beam (Season 3) [366288] = true, -- Force Slam (Season 3) [366566] = true, -- Burst (Season 3) + [373429] = true, -- Season 4 + [373513] = true, -- Season 4 + -- Plaguefall [319898] = true, -- Vile Spit (Slime Tentacle) [328501] = true, -- Plague Bomb (Rigged Plagueborer) @@ -493,6 +525,32 @@ local Spells = { local SpellsNoTank = { + ----------------------------- + ---- Warlords of Draenor ---- + ----------------------------- + + -- Iron Docks + [165122] = true, + [161256] = true, + [162281] = true, + [164734] = true, + [167095] = true, + [167120] = true, + [167233] = true, + [167815] = true, + [169413] = true, + [178411] = true, + + -- Grimrail Depot + [164218] = true, + [164163] = true, + [163536] = true, + [176039] = true, + [161089] = true, + [164102] = true, + [164188] = true, + [176033] = true, + ---------------- ---- LEGION ---- ---------------- @@ -532,6 +590,28 @@ local SpellsNoTank = { [361313] = true, -- Leeching Bite [363073] = true, -- Darkstrikes + -- Karazhan Lower + [228603] = true, + [228995] = true, + [227493] = true, + [228986] = true, + [227339] = true, + [227636] = true, + [238566] = true, + [227638] = true, + [241774] = true, + [228252] = true, + [228252] = true, + [241809] = true, + [228637] = true, + [228396] = true, + [29581] = true, + [29930] = true, + [29665] = true, + [29667] = true, + + -- Karazhan Upper + ------------- ---- BfA ---- @@ -687,10 +767,26 @@ local SpellsNoTank = { [355644] = true, -- Hyperlight Salvo [356967] = true, -- Hyperlight Backhand (Cartel Muscle) [359028] = true, -- Security Slam (Zo'gron) + + -- AFFIXES + [373364] = true, -- Vampiric Claws (Season 4) + [373509] = true, -- Season 4 }; local Auras = { + ----------------------------- + ---- Warlords of Draenor ---- + ----------------------------- + + -- Iron Docks + [163390] = true, + [164504] = true, + [172636] = true, + + -- Grimrail Depot + [166340] = true, + ---------------- ---- LEGION ---- ---------------- @@ -711,6 +807,10 @@ local Auras = { -- Vault of the Wardens + -- Karazhan Lower + + -- Karazhan Upper + ------------- ---- BfA ---- ------------- @@ -812,10 +912,23 @@ local Auras = { [346297] = true, -- Unstable Explosion [346329] = true, -- Spilled Liquids [347728] = true, -- Flock! + + -- Affixes + [373391] = true, -- Season 4 }; local AurasNoTank = { + ----------------------------- + ---- Warlords of Draenor ---- + ----------------------------- + + -- Iron Docks + + -- Grimrail Depot + [164241] = true, + + ---------------- ---- LEGION ---- ---------------- @@ -833,6 +946,15 @@ local AurasNoTank = { -- Vault of the Wardens + -- Karazhan Lower + [227493] = true, + [241774] = true, + [29574] = true, + [230297] = true, + [227832] = true, + + -- Karazhan Upper + ------------- ---- BfA ---- ------------- @@ -859,6 +981,20 @@ local AurasNoTank = { local SpellsToInterrupt = { + ----------------------------- + ---- Warlords of Draenor ---- + ----------------------------- + + -- Iron Docks + [165122] = true, + [178154] = true, + + -- Grimrail Depot + [164192] = true, + [166335] = true, + [163966] = true, + + ---------------- ---- LEGION ---- ---------------- @@ -906,6 +1042,17 @@ local SpellsToInterrupt = { -- Vault of the Wardens [193069] = true, -- Nightmares (Felsworn Infester) + -- Karazhan Lower + [227542] = true, + [228606] = true, + [227987] = true, + [228254] = true, + [227800] = true, + [227823] = true, + [227616] = true, + + -- Karazhan Upper + ------------- ---- BfA ---- ------------- @@ -1103,6 +1250,22 @@ local SpecificBuffOrDebuffOnPartyMembers = { local SpecificBuffOrDebuffOnUnit = { + ----------------------------- + ---- Warlords of Draenor ---- + ----------------------------- + + -- Iron Docks + + -- Grimrail Depot + + ---------------- + ---- LEGION ---- + ---------------- + + -- Karazhan Lower + + -- Karazhan Upper + ------------- ---- BfA ---- ------------- @@ -1143,6 +1306,14 @@ local SpecificBuffOrDebuffOnUnit = { local SpecificCastsDoneByPartyMembers = { + ----------------------------- + ---- Warlords of Draenor ---- + ----------------------------- + + -- Iron Docks + + -- Grimrail Depot + ------------- ---- BfA ---- ------------- @@ -1329,6 +1500,65 @@ local SpecificItemsUsedByPartyMembers = { local DamageDoneToSpecificUnits = { + ----------------------------- + ---- Warlords of Draenor ---- + ----------------------------- + + -- Iron Docks + [79852] = { + type = "BOSS" + }, + [83612] = { + type = "BOSS" + }, + [80816] = { + type = "BOSS" + }, + [83616] = { + type = "BOSS" + }, + [80805] = { + type = "BOSS" + }, + [80808] = { + type = "BOSS" + }, + [81297] = { + type = "BOSS" + }, + [81305] = { + type = "BOSS" + }, + [83613] = { + type = "BOSS" + }, + [89011] = { + type = "ADD" + }, + + -- Grimrail Depot + + [79545] = { + type = "BOSS" + }, + [77816] = { + type = "BOSS" + }, + [77803] = { + type = "BOSS" + }, + [80005] = { + type = "BOSS" + }, + + ---------------- + ---- LEGION ---- + ---------------- + + -- Karazhan Lower + + -- Karazhan Upper + ------------- ---- BfA ---- ------------- @@ -1434,6 +1664,12 @@ local DamageDoneToSpecificUnits = { [184910] = { type = "AFFIX" }, -- Wo Drifter + [190128] = { + type = "AFFIX" + }, + [189878] = { + type = "AFFIX" + }, -- Plaguefall [164362] = { diff --git a/MyDungeonsBook.toc b/MyDungeonsBook.toc index ae8851d..24fb289 100644 --- a/MyDungeonsBook.toc +++ b/MyDungeonsBook.toc @@ -1,6 +1,6 @@ ## Title: MyDungeonsBook ## Notes: Addon to collect and store specific information about your myth+ challenges. -## Version: 2.21.0 +## Version: 2.22.0 ## Author: GelioS ## Interface: 90205 ## OptionalDeps: LibStub, CallbackHandler-1.0, Ace3, LibCompress, LibGroupInSpecT-1.1 @@ -46,6 +46,7 @@ UI/ChallengeDetails/Tabs/Mechanics/Tabs/Damage/Tabs/EnemiesFriendlyFire.lua UI/ChallengeDetails/Tabs/Mechanics/Tabs/Deaths.lua UI/ChallengeDetails/Tabs/Mechanics/Tabs/EffectsAndAuras.lua UI/ChallengeDetails/Tabs/Mechanics/Tabs/EffectsAndAuras/Tabs.lua +UI/ChallengeDetails/Tabs/Mechanics/Tabs/EffectsAndAuras/Tabs/AllDebuffs.lua UI/ChallengeDetails/Tabs/Mechanics/Tabs/EffectsAndAuras/Tabs/AvoidableDebuffs.lua UI/ChallengeDetails/Tabs/Mechanics/Tabs/EffectsAndAuras/Tabs/BrokenAuras.lua UI/ChallengeDetails/Tabs/Mechanics/Tabs/EffectsAndAuras/Tabs/BuffsOrDebuffsOnUnits.lua @@ -105,6 +106,8 @@ Utils/Integrations/MDT.lua Utils/Integrations/WA/API.lua Utils/Integrations/WA/Auras/Aura.lua Utils/Integrations/WA/Auras/CastOnMe.lua +Utils/Integrations/WA/Auras/CustomActionOnSpellCastStart.lua +Utils/Integrations/WA/Auras/CustomActionOnSpellCastSuccess.lua Utils/Integrations/WA/Auras/Dispel.lua Utils/Integrations/WA/Auras/DispelEnemy.lua Utils/Integrations/WA/Auras/Dodge.lua diff --git a/UI/ChallengeDetails/Tabs/Mechanics/Tabs/Casts/Tabs/Interrupts.lua b/UI/ChallengeDetails/Tabs/Mechanics/Tabs/Casts/Tabs/Interrupts.lua index 37cec0d..bdac73b 100644 --- a/UI/ChallengeDetails/Tabs/Mechanics/Tabs/Casts/Tabs/Interrupts.lua +++ b/UI/ChallengeDetails/Tabs/Mechanics/Tabs/Casts/Tabs/Interrupts.lua @@ -22,7 +22,8 @@ local function getInterruptedSpellMenu(rows, index, cols, challengeId) text = L["Weak Auras"], hasArrow = true, menuList = { - MyDungeonsBook:Wa_ContextMenuItem_Interrupt_Create(spellId, instanceId, bosses, affixes) + MyDungeonsBook:Wa_ContextMenuItem_Interrupt_Create(spellId, instanceId, bosses, affixes), + MyDungeonsBook:Wa_ContextMenuItem_CustomActionOnSpellSuccess_Create(spellId, instanceId, bosses, affixes), } } }; diff --git a/UI/ChallengeDetails/Tabs/Mechanics/Tabs/Casts/Tabs/OwnCastsByEnemies.lua b/UI/ChallengeDetails/Tabs/Mechanics/Tabs/Casts/Tabs/OwnCastsByEnemies.lua index 99a5438..9daf3c3 100644 --- a/UI/ChallengeDetails/Tabs/Mechanics/Tabs/Casts/Tabs/OwnCastsByEnemies.lua +++ b/UI/ChallengeDetails/Tabs/Mechanics/Tabs/Casts/Tabs/OwnCastsByEnemies.lua @@ -42,7 +42,9 @@ local function getOwnSpellMenu(rows, index, cols, challengeId) MyDungeonsBook:Wa_ContextMenuItem_Frontal_Create(spellId, instanceId, bosses, affixes), MyDungeonsBook:Wa_ContextMenuItem_Dodge_Create(spellId, instanceId, bosses, affixes), MyDungeonsBook:Wa_ContextMenuItem_Interrupt_Create(spellId, instanceId, bosses, affixes), - MyDungeonsBook:Wa_ContextMenuItem_CastOnMe_Create(spellId, instanceId, bosses, affixes) + MyDungeonsBook:Wa_ContextMenuItem_CastOnMe_Create(spellId, instanceId, bosses, affixes), + MyDungeonsBook:Wa_ContextMenuItem_CustomActionOnSpellStart_Create(spellId, instanceId, bosses, affixes), + MyDungeonsBook:Wa_ContextMenuItem_CustomActionOnSpellSuccess_Create(spellId, instanceId, bosses, affixes) } } }; diff --git a/UI/ChallengeDetails/Tabs/Mechanics/Tabs/EffectsAndAuras/Tabs.lua b/UI/ChallengeDetails/Tabs/Mechanics/Tabs/EffectsAndAuras/Tabs.lua index 7b5dfa0..999c4a2 100644 --- a/UI/ChallengeDetails/Tabs/Mechanics/Tabs/EffectsAndAuras/Tabs.lua +++ b/UI/ChallengeDetails/Tabs/Mechanics/Tabs/EffectsAndAuras/Tabs.lua @@ -19,7 +19,8 @@ function MyDungeonsBook:EffectsAndAurasFrame_CreateTabButtonsFrame(parentFrame) local tabs = self:TabsWidget_Create(parentFrame); tabs:SetTabs({ {value = "dispels", text = L["Dispels"]}, - {value = "avoidableDebuffs", text = L["Avoidable Debuffs"]}, + -- {value = "avoidableDebuffs", text = L["Avoidable Debuffs"]}, + {value = "allDebuffs", text = L["All Debuffs"]}, {value = "allBuffsAndDebuffsOnPartyMembers", text = L["All Buffs & Debuffs"]}, {value = "buffsOrDebuffsOnUnits", text = L["Buffs Or Debuffs On Units"]}, {value = "brokenAuras", text = L["Broken Auras"]}, @@ -29,8 +30,8 @@ function MyDungeonsBook:EffectsAndAurasFrame_CreateTabButtonsFrame(parentFrame) if (tabId == "dispels") then self.dispelsFrame = self:DispelsFrame_Create(container, self.activeChallengeId); end - if (tabId == "avoidableDebuffs") then - self.avoidableDebuffsFrame = self:AvoidableDebuffsFrame_Create(container, self.activeChallengeId); + if (tabId == "allDebuffs") then + self.allDebuffsFrame = self:AllDebuffsFrame_Create(container, self.activeChallengeId); end if (tabId == "allBuffsAndDebuffsOnPartyMembers") then self.allBuffsAndDebuffsOnPartyMembersFrame = self:AllBuffsAndDebuffsOnPartyMembersFrame_Create(container, self.activeChallengeId); diff --git a/UI/ChallengeDetails/Tabs/Mechanics/Tabs/EffectsAndAuras/Tabs/AllDebuffs.lua b/UI/ChallengeDetails/Tabs/Mechanics/Tabs/EffectsAndAuras/Tabs/AllDebuffs.lua new file mode 100644 index 0000000..e97ff06 --- /dev/null +++ b/UI/ChallengeDetails/Tabs/Mechanics/Tabs/EffectsAndAuras/Tabs/AllDebuffs.lua @@ -0,0 +1,164 @@ +--[[-- +@module MyDungeonsBook +]] + +--[[-- +UI +@section UI +]] + +local L = LibStub("AceLocale-3.0"):GetLocale("MyDungeonsBook"); + +local function getAllDebuffsSpellMenu(rows, index, cols, challengeId) + local challenge = MyDungeonsBook:Challenge_GetById(challengeId); + local instanceId = challenge.challengeInfo.currentZoneId; + local affixes = challenge.challengeInfo.affixes; + local bosses = MyDungeonsBook:GetDungeonMetaInfo(instanceId).encounters; + local spellId = rows[index].cols[1].value; + local report = MyDungeonsBook:AllDebuffsFrame_Report_Create(rows[index], cols); + return { + MyDungeonsBook:WowHead_Menu_SpellComplex(spellId), + MyDungeonsBook:Report_Menu(report), + { + text = L["Weak Auras"], + hasArrow = true, + menuList = { + MyDungeonsBook:Wa_ContextMenuItem_Aura_Create(spellId, instanceId, bosses, affixes), + MyDungeonsBook:Wa_ContextMenuItem_PartyAura_Create(spellId, instanceId, bosses, affixes), + MyDungeonsBook:Wa_ContextMenuItem_PartyDispelAura_Create(spellId, instanceId, bosses, affixes) + } + } + }; +end + +--[[-- +Create a frame for Avoidable Debuffs tab (data is taken from `mechanics[**-AVOIDABLE-AURAS]`). + +Mouse hover/out handler are included. + +@param[type=Frame] parentFrame +@param[type=number] challengeId +@return[type=Frame] tableWrapper +]] +function MyDungeonsBook:AllDebuffsFrame_Create(parentFrame, challengeId) + local avoidableDebuffsFrame = self:TabContentWrapperWidget_Create(parentFrame); + local data = self:AllDebuffsFrame_GetDataForTable(challengeId, "PARTY-MEMBERS-AURAS"); + local columns = self:Table_Headers_GetForSpellsSummary(challengeId); + tinsert(columns, 2, { + name = " ", + width = 40, + align = "LEFT", + DoCellUpdate = function(...) + self:Table_Cell_FormatAsDispelIcon(...); + end + }); + columns[4].width = 100; + local table = self:TableWidget_Create(columns, 12, 40, nil, avoidableDebuffsFrame, "all-debuffs"); + table:SetData(data); + table:RegisterEvents({ + OnClick = function(_, _, data, _, _, realrow, column, _, button) + if (button == "RightButton" and realrow) then + EasyMenu(getAllDebuffsSpellMenu(data, realrow, table.cols, challengeId), self.menuFrame, "cursor", 0 , 0, "MENU"); + end + self:Table_Cell_ShiftClick_Check(data, realrow, column, button, 3); + end, + OnEnter = function (_, cellFrame, data, _, _, realrow, column) + if (realrow) then + if (column == 2) then + self:Table_Cell_SpellDebuffMouseHover(cellFrame, data[realrow].cols[1].value); + end + if (column == 3 or column == 4) then + self:Table_Cell_SpellMouseHover(cellFrame, data[realrow].cols[1].value); + end + end + end, + OnLeave = function (_, _, _, _, _, realrow, column) + if (realrow) then + if (column == 2 or column == 3 or column == 4) then + self:Table_Cell_MouseOut(); + end + end + end + }); + return avoidableDebuffsFrame; +end + +--[[-- +Map data about Avoidable Debuffs for challenge with id `challengeId`. + +@param[type=number] challengeId +@param[type=string] key for mechanics table (it's different for BFA and SL) +@return[type=table] +]] +function MyDungeonsBook:AllDebuffsFrame_GetDataForTable(challengeId, key) + local tableData = {}; + if (not challengeId) then + return tableData; + end + local mechanics = self:Challenge_Mechanic_GetById(challengeId, key); + if (not mechanics) then + self:DebugPrint(string.format("No Debuffs data for challenge #%s", challengeId)); + return tableData; + end + for unitName, auras in pairs(mechanics) do + for spellId, spellInfo in pairs(auras) do + if (self.db.global.meta.spells[spellId] and self.db.global.meta.spells[spellId].auraType == "DEBUFF") then + if (not tableData[spellId]) then + tableData[spellId] = { + spellId = spellId, + player = 0, + party1 = 0, + party2 = 0, + party3 = 0, + party4 = 0 + }; + end + local unitId = self:GetPartyUnitByName(challengeId, unitName); + if (unitId) then + tableData[spellId][unitId] = spellInfo.meta.hits; + end + end + end + end + local remappedTableData = {}; + for _, row in pairs(tableData) do + local r = { + cols = {} + }; + tinsert(r.cols, {value = row.spellId}); + tinsert(r.cols, {value = row.spellId}); + tinsert(r.cols, {value = row.spellId}); + tinsert(r.cols, {value = row.spellId}); + local sum = 0; + for _, unitId in pairs(self:GetPartyRoster()) do + local isAvoidable = self:IsSpellAvoidableForPartyMember(challengeId, unitId, row.spellId); + local cell = {value = row[unitId]}; + if (isAvoidable) then + cell.color = { + r = 200, + g = 0, + b = 0, + a = 1 + }; + end + tinsert(r.cols, cell); + if (row[unitId]) then + sum = sum + row[unitId]; + end + end + tinsert(r.cols, {value = sum}); + tinsert(remappedTableData, r); + end + return remappedTableData; +end + +--[[-- +@param[type=table] row +@param[type=table] cols +@return[type=table] +]] +function MyDungeonsBook:AllDebuffsFrame_Report_Create(row, cols) + local spellLink = GetSpellLink(row.cols[1].value); + local title = string.format(L["MyDungeonsBook Debuff %s hits:"], spellLink); + return self:Table_PlayersRow_Report_Create(row, cols, {5, 6, 7, 8, 9, 10}, title); +end diff --git a/UI/ChallengeDetails/Tabs/Mechanics/Tabs/EffectsAndAuras/Tabs/BuffsOrDebuffsOnUnits.lua b/UI/ChallengeDetails/Tabs/Mechanics/Tabs/EffectsAndAuras/Tabs/BuffsOrDebuffsOnUnits.lua index ec22da1..e8e2463 100644 --- a/UI/ChallengeDetails/Tabs/Mechanics/Tabs/EffectsAndAuras/Tabs/BuffsOrDebuffsOnUnits.lua +++ b/UI/ChallengeDetails/Tabs/Mechanics/Tabs/EffectsAndAuras/Tabs/BuffsOrDebuffsOnUnits.lua @@ -74,7 +74,8 @@ local function getBuffsAndDebuffsOnUnitsSpellMenu(rows, index, cols, npcFilter, text = L["Weak Auras"], hasArrow = true, menuList = { - MyDungeonsBook:Wa_ContextMenuItem_EnemyShield_Create(spellId, instanceId, bosses, affixes) + MyDungeonsBook:Wa_ContextMenuItem_EnemyShield_Create(spellId, instanceId, bosses, affixes), + MyDungeonsBook:Wa_ContextMenuItem_DispelEnemy_Create(spellId, instanceId, bosses, affixes) } } }; diff --git a/UI/ChallengeDetails/Tabs/Mechanics/Tabs/EffectsAndAuras/Tabs/Dispels.lua b/UI/ChallengeDetails/Tabs/Mechanics/Tabs/EffectsAndAuras/Tabs/Dispels.lua index bae22fe..5c28fe4 100644 --- a/UI/ChallengeDetails/Tabs/Mechanics/Tabs/EffectsAndAuras/Tabs/Dispels.lua +++ b/UI/ChallengeDetails/Tabs/Mechanics/Tabs/EffectsAndAuras/Tabs/Dispels.lua @@ -23,7 +23,8 @@ local function getDispelSpellMenu(rows, index, cols, challengeId) hasArrow = true, menuList = { MyDungeonsBook:Wa_ContextMenuItem_PartyDispelAura_Create(spellId, instanceId, bosses, affixes), - MyDungeonsBook:Wa_ContextMenuItem_DispelEnemy_Create(spellId, instanceId, bosses, affixes) + MyDungeonsBook:Wa_ContextMenuItem_DispelEnemy_Create(spellId, instanceId, bosses, affixes), + MyDungeonsBook:Wa_ContextMenuItem_PartyAura_Create(spellId, instanceId, bosses, affixes), } } }; diff --git a/Utils/Integrations/WA/Auras/CustomActionOnSpellCastStart.lua b/Utils/Integrations/WA/Auras/CustomActionOnSpellCastStart.lua new file mode 100644 index 0000000..7757304 --- /dev/null +++ b/Utils/Integrations/WA/Auras/CustomActionOnSpellCastStart.lua @@ -0,0 +1,309 @@ +--[[-- +@module MyDungeonsBook +]] + +--[[-- +Utils +@section Utils +]] + +local castStartStopEvents = "UNIT_SPELLCAST_CHANNEL_START UNIT_SPELLCAST_CHANNEL_STOP UNIT_SPELLCAST_CHANNEL_UPDATE UNIT_SPELLCAST_DELAYED UNIT_SPELLCAST_FAILED UNIT_SPELLCAST_FAILED_QUIET UNIT_SPELLCAST_INTERRUPTED UNIT_SPELLCAST_START UNIT_SPELLCAST_STOP UNIT_SPELLCAST_SUCCEEDED"; + +local customTrigger = [[function(allstates, event, sourceUnit, castId, spellId) + if (not sourceUnit) then + return; + end + if (not castId) then + castId = string.format("%s-%s", spellId, UnitGUID(sourceUnit)); + end + if (sourceUnit and UnitIsEnemy(sourceUnit, "player")) then + if (event == "UNIT_SPELLCAST_START" + or event == "UNIT_SPELLCAST_DELAYED" + or event == "UNIT_SPELLCAST_CHANNEL_START" + or event == "UNIT_SPELLCAST_CHANNEL_UPDATE") then + if (spellId == SPELL_ID) then + local name, _, icon, startMs, endMs = UnitCastingInfo(sourceUnit); + if (not name) then + name, _, icon, startMs, endMs = UnitChannelInfo(sourceUnit); + end + local duration = (endMs - startMs) / 1000; + local expiration = endMs / 1000; + allstates[castId] = { + show = true, + changed = true, + autoHide = true, + castId = castId, + icon = icon, + duration = duration, + expirationTime = expiration, + showIcon = true, + name = name, + progressType = "timed" + }; + return true; + end + end + + if (event == "UNIT_SPELLCAST_STOP" + or event == "UNIT_SPELLCAST_SUCCEEDED" + or event == "UNIT_SPELLCAST_INTERRUPTED" + or event == "UNIT_SPELLCAST_FAILED" + or event == "UNIT_SPELLCAST_FAILED_QUIET" + or event == "UNIT_SPELLCAST_CHANNEL_STOP") then + if (spellId == SPELL_ID) then + allstates[castId] = { + show = false, + changed = true, + autoHide = true, + castId = castId + }; + return true; + end + + end + end +end]]; + +function MyDungeonsBook:WA_CustomActionOnSpellStart_Template_Get() + return { + ["iconSource"] = -1, + ["xOffset"] = 0, + ["yOffset"] = 0, + ["anchorPoint"] = "CENTER", + ["cooldownSwipe"] = true, + ["cooldownEdge"] = false, + ["icon"] = true, + ["triggers"] = { + [1] = { + ["trigger"] = { + ["spellId"] = "", + ["duration"] = "", + ["names"] = { + }, + ["use_sourceFlags"] = false, + ["use_cloneId"] = true, + ["debuffType"] = "HELPFUL", + ["type"] = "custom", + ["custom_hide"] = "timed", + ["custom_type"] = "stateupdate", + ["subeventPrefix"] = "SPELL", + ["use_sourceFlags2"] = true, + ["event"] = "Combat Log", + ["sourceFlags2"] = "Hostile", + ["events"] = castStartStopEvents, + ["use_spellId"] = true, + ["spellIds"] = { + }, + ["use_sourceUnit"] = false, + ["check"] = "event", + ["unit"] = "player", + ["custom"] = customTrigger, + ["subeventSuffix"] = "_CAST_START", + }, + ["untrigger"] = { + }, + }, + ["activeTriggerMode"] = -10, + }, + ["internalVersion"] = 51, + ["keepAspectRatio"] = false, + ["selfPoint"] = "CENTER", + ["desaturate"] = false, + ["subRegions"] = { + [1] = { + ["type"] = "subbackground", + }, + [2] = { + ["text_shadowXOffset"] = 0, + ["text_text_format_s_format"] = "none", + ["text_text"] = "", + ["text_shadowColor"] = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 1, + }, + ["text_selfPoint"] = "AUTO", + ["text_automaticWidth"] = "Auto", + ["text_fixedWidth"] = 64, + ["anchorYOffset"] = 0, + ["text_justify"] = "CENTER", + ["rotateText"] = "NONE", + ["type"] = "subtext", + ["text_color"] = { + [1] = 1, + [2] = 1, + [3] = 1, + [4] = 1, + }, + ["text_font"] = "Friz Quadrata TT", + ["text_shadowYOffset"] = 0, + ["text_wordWrap"] = "WordWrap", + ["text_visible"] = true, + ["text_anchorPoint"] = "OUTER_BOTTOM", + ["text_fontSize"] = 32, + ["anchorXOffset"] = 0, + ["text_fontType"] = "OUTLINE", + }, + [3] = { + ["glowFrequency"] = 0.25, + ["type"] = "subglow", + ["glowXOffset"] = 0, + ["glowType"] = "Pixel", + ["glowLength"] = 10, + ["glowYOffset"] = 0, + ["glowColor"] = { + [1] = 0.77647058823529, + [2] = 0.6078431372549, + [3] = 0.42745098039216, + [4] = 1, + }, + ["useGlowColor"] = true, + ["glow"] = true, + ["glowScale"] = 1, + ["glowThickness"] = 3, + ["glowLines"] = 8, + ["glowBorder"] = false, + }, + }, + ["height"] = 128, + ["load"] = { + ["size"] = { + ["multi"] = { + }, + }, + }, + ["authorMode"] = true, + ["regionType"] = "icon", + ["authorOptions"] = { + }, + ["cooldownTextDisabled"] = false, + ["cooldown"] = true, + ["animation"] = { + ["start"] = { + ["type"] = "none", + ["easeStrength"] = 3, + ["duration_type"] = "seconds", + ["easeType"] = "none", + }, + ["main"] = { + ["type"] = "none", + ["easeStrength"] = 3, + ["duration_type"] = "seconds", + ["easeType"] = "none", + }, + ["finish"] = { + ["type"] = "none", + ["easeStrength"] = 3, + ["duration_type"] = "seconds", + ["easeType"] = "none", + }, + }, + ["zoom"] = 0.3, + ["color"] = { + [1] = 1, + [2] = 1, + [3] = 1, + [4] = 1, + }, + ["frameStrata"] = 1, + ["id"] = "", + ["config"] = { + }, + ["alpha"] = 1, + ["width"] = 128, + ["anchorFrameType"] = "SCREEN", + ["uid"] = "", + ["inverse"] = false, + ["actions"] = { + ["start"] = { + }, + ["init"] = { + }, + ["finish"] = { + }, + }, + ["conditions"] = { + }, + ["information"] = { + }, + ["parent"] = "", + }; +end + +--[[-- +@param[type=table] auraData +@param[type=number|nil] instanceId +@param[type=number|nil] bossId +@param[type=number|nil] affixId +@return[type=boolean] +]] +function MyDungeonsBook:WA_CustomActionOnSpellStart_Aura_Create(auraData, instanceId, bossId, affixId, customText) + local wa = self:WA_CustomActionOnSpellStart_Template_Get(); + local spellId = auraData.spellId; + local _, _, icon, castTime = GetSpellInfo(spellId); + wa.triggers[1].trigger.spellId = string.format("%s", spellId); + wa.triggers[1].trigger.duration = string.format("%s", castTime / 1000); + wa.triggers[1].trigger.custom = string.gsub(wa.triggers[1].trigger.custom, "SPELL_ID", spellId); + wa.subRegions[2].text_text = customText; + wa.displayIcon = icon; + wa.id = self:Wa_GenerateId(auraData, instanceId, bossId, affixId, "Custom Action - " .. customText); + + return self:Wa_AddNewWeakAura(wa, auraData, instanceId, bossId, affixId); +end + +function MyDungeonsBook:Wa_ContextMenuItem_CustomActionOnSpellStart_Create(spellId, instanceId, bosses, affixes) + local menuItemsForBosses = {}; + for bossId, bossInfo in pairs(bosses) do + tinsert(menuItemsForBosses, { + text = bossInfo.name, + func = function() + StaticPopup_Show("MDB_WA_CUSTOM_TEXT_INPUT", "", "", { + auraData = {spellId = spellId}, + bossId = bossId, + instanceId = instanceId, + type = "CUSTOM_ACTION_ON_SPELL_CAST_START" + }); + end + }); + end + local menuItemsForAffixes = {}; + for _, affixId in pairs(affixes) do + tinsert(menuItemsForAffixes, { + text = self:GetAffixMetaInfo(affixId).name, + func = function() + StaticPopup_Show("MDB_WA_CUSTOM_TEXT_INPUT", "", "", { + auraData = {spellId = spellId}, + affixId = affixId, + type = "CUSTOM_ACTION_ON_SPELL_CAST_START" + }); + end + }); + end + return { + text = "Custom Action on Spell Cast START", + hasArrow = true, + menuList = { + { + text = "Trash", + func = function() + StaticPopup_Show("MDB_WA_CUSTOM_TEXT_INPUT", "", "", { + auraData = { spellId = spellId }, + instanceId = instanceId, + type = "CUSTOM_ACTION_ON_SPELL_CAST_START" + }); + end + }, + { + text = "Boss", + hasArrow = true, + menuList = menuItemsForBosses + }, + { + text = "Affix", + hasArrow = true, + menuList = menuItemsForAffixes + } + } + }; +end \ No newline at end of file diff --git a/Utils/Integrations/WA/Auras/CustomActionOnSpellCastSuccess.lua b/Utils/Integrations/WA/Auras/CustomActionOnSpellCastSuccess.lua new file mode 100644 index 0000000..750469d --- /dev/null +++ b/Utils/Integrations/WA/Auras/CustomActionOnSpellCastSuccess.lua @@ -0,0 +1,260 @@ +--[[-- +@module MyDungeonsBook +]] + +--[[-- +Utils +@section Utils +]] + +function MyDungeonsBook:WA_CustomActionOnSpellSuccess_Template_Get() + return { + ["iconSource"] = -1, + ["authorOptions"] = { + }, + ["preferToUpdate"] = false, + ["yOffset"] = 0, + ["anchorPoint"] = "CENTER", + ["cooldownSwipe"] = true, + ["cooldownEdge"] = false, + ["icon"] = true, + ["triggers"] = { + [1] = { + ["trigger"] = { + ["use_sourceFlags2"] = true, + ["type"] = "combatlog", + ["spellId"] = "162407", + ["subeventSuffix"] = "_CAST_SUCCESS", + ["names"] = { + }, + ["duration"] = "5", + ["event"] = "Combat Log", + ["unit"] = "player", + ["subeventPrefix"] = "SPELL", + ["use_spellId"] = true, + ["spellIds"] = { + }, + ["use_sourceUnit"] = false, + ["sourceFlags2"] = "Hostile", + ["use_sourceFlags3"] = false, + ["use_cloneId"] = true, + ["debuffType"] = "HELPFUL", + }, + ["untrigger"] = { + }, + }, + ["activeTriggerMode"] = -10, + }, + ["internalVersion"] = 53, + ["keepAspectRatio"] = false, + ["selfPoint"] = "CENTER", + ["desaturate"] = false, + ["subRegions"] = { + [1] = { + ["type"] = "subbackground", + }, + [2] = { + ["text_shadowXOffset"] = 0, + ["text_text_format_s_format"] = "none", + ["text_text"] = "HEAL", + ["text_shadowColor"] = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 1, + }, + ["text_selfPoint"] = "AUTO", + ["text_automaticWidth"] = "Auto", + ["text_fixedWidth"] = 64, + ["anchorYOffset"] = 0, + ["text_justify"] = "CENTER", + ["rotateText"] = "NONE", + ["type"] = "subtext", + ["text_color"] = { + [1] = 1, + [2] = 1, + [3] = 1, + [4] = 1, + }, + ["text_font"] = "Friz Quadrata TT", + ["text_shadowYOffset"] = 0, + ["text_wordWrap"] = "WordWrap", + ["text_visible"] = true, + ["text_anchorPoint"] = "OUTER_BOTTOM", + ["text_fontSize"] = 32, + ["anchorXOffset"] = 0, + ["text_fontType"] = "OUTLINE", + }, + [3] = { + ["glowFrequency"] = 0.25, + ["type"] = "subglow", + ["glowXOffset"] = 0, + ["glowType"] = "Pixel", + ["glowLength"] = 10, + ["glowYOffset"] = 0, + ["glowColor"] = { + [1] = 0.77647058823529, + [2] = 0.6078431372549, + [3] = 0.42745098039216, + [4] = 1, + }, + ["useGlowColor"] = true, + ["glow"] = true, + ["glowThickness"] = 3, + ["glowScale"] = 1, + ["glowLines"] = 8, + ["glowBorder"] = false, + }, + }, + ["height"] = 128, + ["load"] = { + ["talent"] = { + ["multi"] = { + }, + }, + ["size"] = { + ["multi"] = { + }, + }, + ["class"] = { + ["multi"] = { + }, + }, + ["spec"] = { + ["multi"] = { + }, + }, + }, + ["source"] = "import", + ["displayIcon"] = 134279, + ["parent"] = "", + ["regionType"] = "icon", + ["information"] = { + }, + ["animation"] = { + ["start"] = { + ["easeStrength"] = 3, + ["type"] = "none", + ["duration_type"] = "seconds", + ["easeType"] = "none", + }, + ["main"] = { + ["easeStrength"] = 3, + ["type"] = "none", + ["duration_type"] = "seconds", + ["easeType"] = "none", + }, + ["finish"] = { + ["easeStrength"] = 3, + ["type"] = "none", + ["duration_type"] = "seconds", + ["easeType"] = "none", + }, + }, + ["useCooldownModRate"] = true, + ["zoom"] = 0.3, + ["actions"] = { + ["start"] = { + }, + ["finish"] = { + }, + ["init"] = { + }, + }, + ["cooldownTextDisabled"] = false, + ["uid"] = "", + ["id"] = "", + ["color"] = { + [1] = 1, + [2] = 1, + [3] = 1, + [4] = 1, + }, + ["alpha"] = 1, + ["anchorFrameType"] = "SCREEN", + ["frameStrata"] = 1, + ["config"] = { + }, + ["inverse"] = false, + ["width"] = 128, + ["conditions"] = { + }, + ["cooldown"] = true, + ["xOffset"] = 0, + }; +end + +--[[-- +@param[type=table] auraData +@param[type=number|nil] instanceId +@param[type=number|nil] bossId +@param[type=number|nil] affixId +@return[type=boolean] +]] +function MyDungeonsBook:WA_CustomActionOnSpellSuccess_Aura_Create(auraData, instanceId, bossId, affixId, customText) + local wa = self:WA_CustomActionOnSpellSuccess_Template_Get(); + local spellId = auraData.spellId; + local _, _, icon, castTime = GetSpellInfo(spellId); + wa.triggers[1].trigger.spellId = string.format("%s", spellId); + wa.subRegions[2].text_text = customText; + wa.displayIcon = icon; + wa.id = self:Wa_GenerateId(auraData, instanceId, bossId, affixId, "Custom Action - " .. customText); + + return self:Wa_AddNewWeakAura(wa, auraData, instanceId, bossId, affixId); +end + +function MyDungeonsBook:Wa_ContextMenuItem_CustomActionOnSpellSuccess_Create(spellId, instanceId, bosses, affixes) + local menuItemsForBosses = {}; + for bossId, bossInfo in pairs(bosses) do + tinsert(menuItemsForBosses, { + text = bossInfo.name, + func = function() + StaticPopup_Show("MDB_WA_CUSTOM_TEXT_INPUT", "", "", { + auraData = {spellId = spellId}, + bossId = bossId, + instanceId = instanceId, + type = "CUSTOM_ACTION_ON_SPELL_CAST_SUCCESS" + }); + end + }); + end + local menuItemsForAffixes = {}; + for _, affixId in pairs(affixes) do + tinsert(menuItemsForAffixes, { + text = self:GetAffixMetaInfo(affixId).name, + func = function() + StaticPopup_Show("MDB_WA_CUSTOM_TEXT_INPUT", "", "", { + auraData = {spellId = spellId}, + affixId = affixId, + type = "CUSTOM_ACTION_ON_SPELL_CAST_SUCCESS" + }); + end + }); + end + return { + text = "Custom Action on Spell Cast SUCCESS", + hasArrow = true, + menuList = { + { + text = "Trash", + func = function() + StaticPopup_Show("MDB_WA_CUSTOM_TEXT_INPUT", "", "", { + auraData = { spellId = spellId }, + instanceId = instanceId, + type = "CUSTOM_ACTION_ON_SPELL_CAST_SUCCESS" + }); + end + }, + { + text = "Boss", + hasArrow = true, + menuList = menuItemsForBosses + }, + { + text = "Affix", + hasArrow = true, + menuList = menuItemsForAffixes + } + } + }; +end \ No newline at end of file diff --git a/Utils/Integrations/WA/Auras/Dispel.lua b/Utils/Integrations/WA/Auras/Dispel.lua index 9ec5d97..d10db88 100644 --- a/Utils/Integrations/WA/Auras/Dispel.lua +++ b/Utils/Integrations/WA/Auras/Dispel.lua @@ -7,6 +7,20 @@ Utils @section Utils ]] +local customText = [[function() + local affected = aura_env.state.affected or ""; + if (not string.find(affected, ", ")) then + return WA_ClassColorName(affected:gsub("%(%*%)", "")); + end + + affected = affected .. ", "; + local result = ""; + for unitName in (affected):gmatch("(.-)"..", ") do + result = string.format("%s\n%s", result, WA_ClassColorName(unitName:gsub("%(%*%)", ""):gsub("^%s*(.-)%s*$", "%1")) or ""); + end + return result; +end]] + function MyDungeonsBook:WA_PartyDispelAura_Template_Get() return { ["iconSource"] = -1, @@ -16,6 +30,7 @@ function MyDungeonsBook:WA_PartyDispelAura_Template_Get() [3] = 1, [4] = 1, }, + ["customText"] = customText, ["yOffset"] = 0, ["anchorPoint"] = "CENTER", ["cooldownSwipe"] = true, @@ -58,7 +73,7 @@ function MyDungeonsBook:WA_PartyDispelAura_Template_Get() [2] = { ["text_shadowXOffset"] = 0, ["text_text_format_s_format"] = "none", - ["text_text"] = "", + ["text_text"] = "%c", ["text_shadowColor"] = { [1] = 0, [2] = 0, @@ -108,6 +123,41 @@ function MyDungeonsBook:WA_PartyDispelAura_Template_Get() ["glowLines"] = 8, ["glowBorder"] = false, }, + [4] = { + ["text_shadowXOffset"] = 0, + ["text_text"] = "", + ["text_shadowColor"] = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 1, + }, + ["text_selfPoint"] = "AUTO", + ["text_automaticWidth"] = "Auto", + ["text_fixedWidth"] = 64, + ["anchorYOffset"] = 0, + ["text_justify"] = "CENTER", + ["rotateText"] = "NONE", + ["type"] = "subtext", + ["text_color"] = { + [1] = 1, + [2] = 1, + [3] = 1, + [4] = 1, + }, + ["text_font"] = "Friz Quadrata TT", + ["text_text_format_p_time_precision"] = 1, + ["text_shadowYOffset"] = 0, + ["text_text_format_p_time_dynamic_threshold"] = 60, + ["text_wordWrap"] = "WordWrap", + ["text_fontType"] = "OUTLINE", + ["text_anchorPoint"] = "INNER_BOTTOMRIGHT", + ["text_text_format_p_time_format"] = 0, + ["text_text_format_p_format"] = "timed", + ["text_fontSize"] = 22, + ["anchorXOffset"] = 0, + ["text_visible"] = true, + }, }, ["height"] = 128, ["load"] = { @@ -144,10 +194,6 @@ function MyDungeonsBook:WA_PartyDispelAura_Template_Get() ["uid"] = "", ["inverse"] = false, ["cooldownTextDisabled"] = false, - ["conditions"] = { - }, - ["information"] = { - }, ["animation"] = { ["start"] = { ["type"] = "none", @@ -241,26 +287,26 @@ function MyDungeonsBook:WA_PartyDispelAura_Aura_Create(auraData, instanceId, bos local auraType = self.db.global.meta.spells[spellId].auraType; local _, _, icon = GetSpellInfo(spellId); local loadForSpecs = {}; - local waText = "%affected\\n"; + local waText = ""; if (dispelType == "MAGIC") then loadForSpecs = getSpecIdsDispelMagic(); - waText = waText .. "Magic!"; + waText = "Magic"; end if (dispelType == "CURSE") then loadForSpecs = getSpecIdsDispelCurse(); - waText = waText .. "Curse!"; + waText = "Curse"; end if (dispelType == "POISON") then loadForSpecs = getSpecIdsDispelPoison(); - waText = waText .. "Poison!"; + waText = "Poison"; end if (dispelType == "DISEASE") then loadForSpecs = getSpecIdsDispelDisease(); - waText = waText .. "Disease!"; + waText = "Disease"; end tinsert(wa.triggers[1].trigger.auraspellids, string.format("%s", spellId)); wa.triggers[1].trigger.debuffType = self:Wa_AuraTypeToWaAuraType(auraType); - wa.subRegions[2].text_text = waText; + wa.subRegions[4].text_text = waText; wa.displayIcon = icon; wa.load.class_and_spec.multi = loadForSpecs; wa.id = self:Wa_GenerateId(auraData, instanceId, bossId, affixId, auraType, string.format("[Party Tracker] [%s]", dispelType)); diff --git a/Utils/Integrations/WA/Auras/DispelEnemy.lua b/Utils/Integrations/WA/Auras/DispelEnemy.lua index 0ff0d62..08880f4 100644 --- a/Utils/Integrations/WA/Auras/DispelEnemy.lua +++ b/Utils/Integrations/WA/Auras/DispelEnemy.lua @@ -230,20 +230,16 @@ local function getSpecIdsDispelEnemyMagic() end local function getSpecIdsDispelEnemyEnrage() return { - [63] = true, - [262] = true, - [263] = true, - [264] = true, + [103] = true, + [261] = true, + [104] = true, [253] = true, + [260] = true, [254] = true, - [62] = true, + [105] = true, [255] = true, - [581] = true, - [256] = true, - [257] = true, - [258] = true, - [577] = true, - [64] = true, + [102] = true, + [259] = true, }; end diff --git a/Utils/Integrations/WA/Auras/PartyAura.lua b/Utils/Integrations/WA/Auras/PartyAura.lua index c0791f8..2d9ae6b 100644 --- a/Utils/Integrations/WA/Auras/PartyAura.lua +++ b/Utils/Integrations/WA/Auras/PartyAura.lua @@ -7,6 +7,19 @@ Utils @section Utils ]] +local customText = [[function() + local affected = aura_env.state.affected or ""; + if (not string.find(affected, ", ")) then + return WA_ClassColorName(affected:gsub("%(%*%)", "")); + end + + affected = affected .. ", "; + local result = ""; + for unitName in (affected):gmatch("(.-)"..", ") do + result = string.format("%s\n%s", result, WA_ClassColorName(unitName:gsub("%(%*%)", ""):gsub("^%s*(.-)%s*$", "%1")) or ""); + end + return result; +end]] function MyDungeonsBook:WA_PartyAura_Template_Get() return { @@ -17,7 +30,7 @@ function MyDungeonsBook:WA_PartyAura_Template_Get() [3] = 1, [4] = 1, }, - ["customText"] = "function()\n local affected = aura_env.state.affected or \"\";\n local result = \"\";\n if (not string.find(affected, \", \")) then\n return WA_ClassColorName(affected);\n end\n \n for unitName in (affected):gmatch(\"(.-)\"..\", \") do\n result = string.format(\"%s\\n%s\", result, WA_ClassColorName(unitName:gsub(\"%(%*%)\", \"\"):gsub(\"^%s*(.-)%s*$\", \"%1\")) or \"\");\n end\n return result:gsub(\"^%s*(.-)%s*$\", \"%1\");\nend", + ["customText"] = customText, ["yOffset"] = 0, ["anchorPoint"] = "CENTER", ["cooldownSwipe"] = true,