From 9c0a5e21b2937d2d4e7a8c4a69e83b96fd4a4cf2 Mon Sep 17 00:00:00 2001 From: "vjekoslav.krenek@gmail.com" <313787825+svart2521@users.noreply.github.com> Date: Thu, 10 Sep 2026 21:22:14 +0200 Subject: [PATCH] Fix: Targeted Spells "Where to Show" Bug Bug: Issue: Targeted Spell Bars and AuraBuffReminders sections set to only show in specific content types (e.g. Mythic/Non-Mythic Dungeons) still showed up in World Tier Lair boss fights. Both modules classify the current zone into a location bucket via a fixed allowlist of instanceType/difficultyID combos; anything unrecognized falls through to an "always show" fallback meant for genuinely unmappable content like arenas/PvP. Lairs are a brand-new instanced content type (four difficulty tiers: World, Normal, Heroic, Mythic) that didn't exist when these allowlists were written, so they fell into that same always-show fallback in both places, and neither options panel had a Lair entry to filter them with. Fix: added a single "lair" location bucket to both modules, covering all four Lair difficulty tiers at once, detected via hasWorldTier (Blizzard's own GetInstanceInfo() flag for World-Tier-scaled content, added in patch 12.0.7) rather than guessing at specific difficulty IDs, checked ahead of the existing instanceType/difficultyID branches. Added a matching "Lair" checkbox to both Where to Show options lists. --- .../EllesmereUIAuraBuffReminders.lua | 6 +++++- .../EUI_MythicTimer_TargetedSpellBars.lua | 7 +++++-- EllesmereUIOptions/EUI_AuraBuffReminders_Options.lua | 1 + EllesmereUIOptions/EUI_MythicTimer_Options.lua | 1 + 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/EllesmereUIAuraBuffReminders/EllesmereUIAuraBuffReminders.lua b/EllesmereUIAuraBuffReminders/EllesmereUIAuraBuffReminders.lua index 997d7deb4..c7cbe1943 100644 --- a/EllesmereUIAuraBuffReminders/EllesmereUIAuraBuffReminders.lua +++ b/EllesmereUIAuraBuffReminders/EllesmereUIAuraBuffReminders.lua @@ -178,9 +178,10 @@ local _cachedIType, _cachedDiffID, _cachedMapID local _dungeonPrePull = true local function CacheInstanceInfo() - local _, iType, diffID = GetInstanceInfo() + local _, iType, diffID, _, _, _, _, _, _, _, hasWorldTier = GetInstanceInfo() _cachedIType = iType _cachedDiffID = tonumber(diffID) or 0 + EABR._cachedWorldTier = hasWorldTier and true or false local mapID = C_Map and C_Map.GetBestMapForUnit and C_Map.GetBestMapForUnit("player") or nil if mapID ~= _cachedMapID then _dungeonPrePull = true @@ -279,6 +280,9 @@ end -- (Heroic / Normal / Follower), timewalking, delve. Returns nil for unmapped -- instanced content (e.g. PvP) so reminders never silently vanish there. function EABR.CurrentWhereBucket(inInstance) + -- CurrentDifficultyCat's allowlist predates Lairs, so without this early + -- return they'd hit the unmapped case and always show. + if EABR._cachedWorldTier then return "lair" end local cat = EABR.CurrentDifficultyCat() if cat == "d_mplus" or cat == "d_mythic" then return "dungeon_mythic" end if cat == "d_heroic" or cat == "d_normal" or cat == "d_follower" then return "dungeon_nonmythic" end diff --git a/EllesmereUIMythicTimer/EUI_MythicTimer_TargetedSpellBars.lua b/EllesmereUIMythicTimer/EUI_MythicTimer_TargetedSpellBars.lua index 38d0d1bc5..5daf1f3f8 100644 --- a/EllesmereUIMythicTimer/EUI_MythicTimer_TargetedSpellBars.lua +++ b/EllesmereUIMythicTimer/EUI_MythicTimer_TargetedSpellBars.lua @@ -86,8 +86,11 @@ local function CurrentWhereBucket() if C_ChallengeMode and C_ChallengeMode.IsChallengeModeActive and C_ChallengeMode.IsChallengeModeActive() then return "dungeon_mythic" end - local _, iType, diffID = GetInstanceInfo() + local _, iType, diffID, _, _, _, _, _, _, _, hasWorldTier = GetInstanceInfo() diffID = tonumber(diffID) or 0 + -- The diffID branches below predate Lairs, so without this early return + -- they'd hit the unmapped case and always show. + if hasWorldTier then return "lair" end if iType == "party" then if diffID == 23 or diffID == 8 then return "dungeon_mythic" end if diffID == 2 or diffID == 1 or diffID == 205 then return "dungeon_nonmythic" end @@ -111,7 +114,7 @@ end -- (PvP, arena) never hides. local LOCATION_KEYS = { "open_world", "raid_mythic", "raid_heroic", "raid_normal_lfr", - "dungeon_mythic", "dungeon_nonmythic", "timewalking", "delve", + "dungeon_mythic", "dungeon_nonmythic", "timewalking", "delve", "lair", } -- Combat state is TRACKED from PLAYER_REGEN_DISABLED / _ENABLED instead of diff --git a/EllesmereUIOptions/EUI_AuraBuffReminders_Options.lua b/EllesmereUIOptions/EUI_AuraBuffReminders_Options.lua index 401f03db9..2cdc39e2f 100644 --- a/EllesmereUIOptions/EUI_AuraBuffReminders_Options.lua +++ b/EllesmereUIOptions/EUI_AuraBuffReminders_Options.lua @@ -698,6 +698,7 @@ initFrame:SetScript("OnEvent", function(self) { key="dungeon_nonmythic", label="Non-Mythic Dungeons" }, { key="timewalking", label="Timewalking" }, { key="delve", label="Delve" }, + { key="lair", label="Lair" }, -- Orthogonal state gate (not a location): unchecking hides this -- section while in combat. { key="in_combat", label="In Combat" }, diff --git a/EllesmereUIOptions/EUI_MythicTimer_Options.lua b/EllesmereUIOptions/EUI_MythicTimer_Options.lua index 0397abcbe..37c96e3e5 100644 --- a/EllesmereUIOptions/EUI_MythicTimer_Options.lua +++ b/EllesmereUIOptions/EUI_MythicTimer_Options.lua @@ -1008,6 +1008,7 @@ initFrame:SetScript("OnEvent", function(self) { key="dungeon_nonmythic", label="Non-Mythic Dungeons" }, { key="timewalking", label="Timewalking" }, { key="delve", label="Delve" }, + { key="lair", label="Lair" }, { key="in_combat", label="In Combat" }, { key="out_of_combat", label="Out of Combat" }, }