From 60efa6581064c5e79eac448684f14a46a1347a7d Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Sat, 28 Sep 2024 16:30:11 +0700 Subject: [PATCH 1/4] Remove guild achievement spam workaround --- ls_Toasts/locales/enUS.lua | 2 - ls_Toasts/locales/ruRU.lua | 2 - ls_Toasts/systems/achievement.lua | 81 ------------------------------- 3 files changed, 85 deletions(-) diff --git a/ls_Toasts/locales/enUS.lua b/ls_Toasts/locales/enUS.lua index 7bdd044..7fbda2e 100644 --- a/ls_Toasts/locales/enUS.lua +++ b/ls_Toasts/locales/enUS.lua @@ -111,8 +111,6 @@ L["YOU_RECEIVED"] = "You Received" -- Retail L["CURRENCY_THRESHOLD_DESC"] = "Enter |cffffd200-1|r to ignore the currency, |cffffd2000|r to disable the filter, or |cffffd200any number above 0|r to set the threshold below which no toasts will be created." -L["FILTER_GUILD_ACHIEVEMENTS"] = "Filter Guild Achievements" -L["FILTER_GUILD_ACHIEVEMENTS_DESC"] = "Enabling this option will block toasts for faction-specific guild achievements. They're the cause of the achievement spam in big cross-faction guilds." L["HANDLE_LEFT_CLICK"] = "Handle Left Click" L["NEW_CURRENCY_FILTER_DESC"] = "Enter a currency ID." L["SHOW_QUEST_ITEMS"] = "Show Quest Items" diff --git a/ls_Toasts/locales/ruRU.lua b/ls_Toasts/locales/ruRU.lua index 3ed98b3..8e1055d 100644 --- a/ls_Toasts/locales/ruRU.lua +++ b/ls_Toasts/locales/ruRU.lua @@ -58,8 +58,6 @@ L["YOU_RECEIVED"] = "Вы получили" -- Retail L["CURRENCY_THRESHOLD_DESC"] = "Введите |cffffd200-1|r, чтобы игнорировать валюту, |cffffd2000|r, чтобы отключить фильтр, или |cffffd200любое число больше 0|r, чтобы установить порог, ниже которого уведомления не будут показываться." -L["FILTER_GUILD_ACHIEVEMENTS"] = "Фильтр достижений гильдии" -L["FILTER_GUILD_ACHIEVEMENTS_DESC"] = "Включение данной настройки заблокирует уведомления для достижений гильдии, которые связанны с фракциями. Они являются причиной спама достижений в крупных межфракционных гильдиях." L["HANDLE_LEFT_CLICK"] = "Обрабатывать левый щелчок" L["NEW_CURRENCY_FILTER_DESC"] = "Введите ID валюты." L["SHOW_QUEST_ITEMS"] = "Показывать кв. пр." diff --git a/ls_Toasts/systems/achievement.lua b/ls_Toasts/systems/achievement.lua index e106bb7..2c70cbc 100644 --- a/ls_Toasts/systems/achievement.lua +++ b/ls_Toasts/systems/achievement.lua @@ -5,75 +5,6 @@ local E, L, C = addonTable.E, addonTable.L, addonTable.C local _G = getfenv(0) -- Mine -local FACTION_ACHIEVEMENTS = { - [ 4912] = true, -- Guild Level 25 (Alliance) - [ 5014] = true, -- Guild Northrend Dungeon Hero (Alliance) - [ 5031] = true, -- Horde Slayer (Alliance) - [ 5110] = true, -- Heroic: Trial of the Champion Guild Run (Horde) - [ 5111] = true, -- Heroic: Trial of the Champion Guild Run (Alliance) - [ 5124] = true, -- Guild Northrend Dungeon Hero (Horde) - [ 5126] = true, -- Dungeon Diplomat (Alliance) - [ 5128] = true, -- Classic Battles (Horde) - [ 5129] = true, -- Ambassadors (Alliance) - [ 5130] = true, -- Diplomacy (Alliance) - [ 5131] = true, -- Classic Battles (Alliance) - [ 5145] = true, -- Dungeon Diplomat (Horde) - [ 5151] = true, -- Classy Humans (Alliance) - [ 5152] = true, -- Stay Classy (Alliance) - [ 5153] = true, -- Classy Night Elves (Alliance) - [ 5154] = true, -- Classy Gnomes (Alliance) - [ 5155] = true, -- Classy Dwarves (Alliance) - [ 5156] = true, -- Classy Draenei (Alliance) - [ 5157] = true, -- Classy Worgen (Alliance) - [ 5158] = true, -- Stay Classy (Horde) - [ 5160] = true, -- Classy Orcs (Horde) - [ 5161] = true, -- Classy Tauren (Horde) - [ 5162] = true, -- Classy Trolls (Horde) - [ 5163] = true, -- Classy Blood Elves (Horde) - [ 5164] = true, -- Classy Undead (Horde) - [ 5165] = true, -- Classy Goblins (Horde) - [ 5167] = true, -- Orc Slayer (Alliance) - [ 5168] = true, -- Tauren Slayer (Alliance) - [ 5169] = true, -- Undead Slayer (Alliance) - [ 5170] = true, -- Troll Slayer (Alliance) - [ 5171] = true, -- Blood Elf Slayer (Alliance) - [ 5172] = true, -- Goblin Slayer (Alliance) - [ 5173] = true, -- Human Slayer (Horde) - [ 5174] = true, -- Night Elf Slayer (Horde) - [ 5175] = true, -- Dwarf Slayer (Horde) - [ 5176] = true, -- Gnome Slayer (Horde) - [ 5177] = true, -- Draenei Slayer (Horde) - [ 5178] = true, -- Worgen Slayer (Horde) - [ 5179] = true, -- Alliance Slayer (Horde) - [ 5194] = true, -- City Attacker (Horde) - [ 5195] = true, -- City Attacker (Alliance) - [ 5432] = true, -- Guild Commanders (Alliance) - [ 5433] = true, -- Guild Champions (Horde) - [ 5434] = true, -- Guild Marshals (Alliance) - [ 5435] = true, -- Guild Generals (Horde) - [ 5436] = true, -- Guild Field Marshals (Alliance) - [ 5437] = true, -- Guild Warlords (Horde) - [ 5438] = true, -- Guild Grand Marshals (Alliance) - [ 5439] = true, -- Guild High Warlords (Horde) - [ 5440] = true, -- Guild Battlemasters (Horde) - [ 5441] = true, -- Guild Battlemasters (Alliance) - [ 5492] = true, -- Guild Level 25 (Horde) - [ 5812] = true, -- United Nations (Alliance) - [ 5892] = true, -- United Nations (Horde) - [ 6532] = true, -- Pandaren Slayer (Alliance) - [ 6533] = true, -- Pandaren Slayer (Horde) - [ 6624] = true, -- Classy Pandaren (Alliance) - [ 6625] = true, -- Classy Pandaren (Horde) - [ 6644] = true, -- Pandaren Embassy (Alliance) - [ 6664] = true, -- Pandaren Embassy (Horde) - [ 7448] = true, -- Scenario Roundup (Alliance) - [ 7449] = true, -- Scenario Roundup (Horde) - [ 7843] = true, -- Diplomacy (Horde) - [ 7844] = true, -- Ambassadors (Horde) - [13319] = true, -- Battle of Dazar'alor Guild Run (Horde) - [13320] = true, -- Battle of Dazar'alor Guild Run (Alliance) -} - local function Toast_OnClick(self) if self._data.ach_id and not InCombatLockdown() then if not AchievementFrame then @@ -108,10 +39,6 @@ end local function Toast_SetUp(event, achievementID, eventArg, isCriteria) -- eventArg is alreadyEarned or criteriaString local _, name, points, _, _, _, _, _, _, icon, _, isGuildAchievement = GetAchievementInfo(achievementID) - if isGuildAchievement and FACTION_ACHIEVEMENTS[achievementID] and C.db.profile.types.achievement.filter_guild then - return - end - local toast = E:GetToast() if isCriteria then @@ -193,7 +120,6 @@ E:RegisterOptions("achievement", { anchor = 1, dnd = false, tooltip = true, - filter_guild = false, }, { name = L["TYPE_ACHIEVEMENT"], get = function(info) @@ -228,13 +154,6 @@ E:RegisterOptions("achievement", { type = "toggle", name = L["TOOLTIPS"], }, - filter_guild = { - order = 4, - type = "toggle", - name = L["FILTER_GUILD_ACHIEVEMENTS"], - desc = L["FILTER_GUILD_ACHIEVEMENTS_DESC"], - width = 1.25, - }, test = { type = "execute", order = 99, From 69f05fc7c16d24afc33ac42d901c8b1329cc9144 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Sat, 28 Sep 2024 17:09:01 +0700 Subject: [PATCH 2/4] .toc bump --- ls_Toasts/ls_Toasts.toc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ls_Toasts/ls_Toasts.toc b/ls_Toasts/ls_Toasts.toc index ff0dd49..f24a056 100644 --- a/ls_Toasts/ls_Toasts.toc +++ b/ls_Toasts/ls_Toasts.toc @@ -1,6 +1,6 @@ ## Interface: 110002, 110005 ## Author: lightspark -## Version: 110002.02 +## Version: 110002.03 ## Title: LS: |cff00cc99Toasts|r ## Notes: Better toasts, cheers! ## IconTexture: Interface\AddOns\ls_Toasts\assets\logo-64 From 991d315e59546f0855098c7cb6166704ff077d7f Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Sat, 28 Sep 2024 17:10:02 +0700 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=93=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 5 +++++ ls_Toasts/core/changelog.lua | 8 ++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 56a42b3..32b9ab5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # CHANGELOG +## Version 110002.03 + +- Removed the workaround for the guild achievement spam. It's finally fixed by Blizzard. An ancient bug that had been + ignored for years got fixed asap after it showed up multiple times during RWF streams and caused a few wipes. + ## Version 110002.02 - Reworked the workaround for the guild achievement spam. After further investigating the issue it became apparent that diff --git a/ls_Toasts/core/changelog.lua b/ls_Toasts/core/changelog.lua index 394c356..6090625 100644 --- a/ls_Toasts/core/changelog.lua +++ b/ls_Toasts/core/changelog.lua @@ -6,10 +6,6 @@ local _G = getfenv(0) -- Mine E.CHANGELOG = [[ -- Reworked the workaround for the guild achievement spam. After further investigating the issue it became apparent that - it's impossible to reliably automate it without affecting newer smaller guilds that might want to see toasts for these - achievements. For this reason I'm adding a toggle to enable filtering for guild achievements if your guild is - experiencing it. This will block toasts for a bunch of faction-specific PvP and reputation achievements. Can be found - at /LST > Toast Types > Achievement > Filter Guild Achievements, disabled by default. -- Updated Traditional Chinese translation. Translated by BNS333@Curse. +- Removed the workaround for the guild achievement spam. It's finally fixed by Blizzard. An ancient bug that had been + ignored for years got fixed asap after it showed up multiple times during RWF streams and caused a few wipes. ]] From 5d45e5e752ae2ac559a76f2b44cc5f1e9bcb015c Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Sat, 28 Sep 2024 17:15:35 +0700 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=94=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ls_Toasts/core/modernize.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ls_Toasts/core/modernize.lua b/ls_Toasts/core/modernize.lua index 9fe1ed7..59d065a 100644 --- a/ls_Toasts/core/modernize.lua +++ b/ls_Toasts/core/modernize.lua @@ -47,5 +47,14 @@ function P:Modernize(data, name, key) data.point = nil data.version = 8010005 end + + -- ->110002.03 + if data.version < 11000203 then + if data.types and data.types.achievement then + data.types.achievement.filter_guild = nil + end + + data.version = 11000203 + end end end