From 9679966f37d731521200f3f0a6c373511254fd8b Mon Sep 17 00:00:00 2001 From: Florian Berthold Date: Sun, 17 May 2026 06:08:34 +0200 Subject: [PATCH] coa: fix "Show curable only" debuff filter for CoA custom classes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit UnitAura "HARMFUL|RAID" only honours vanilla class dispel knowledge in the 3.3.5 client — CoA custom classes (Chronomancer, Monk/Templar, Prophet/Venomancer, etc.) were silently filtered to zero debuffs. Fix: in updateGroup(), detect CoA dispellers via C_Player:IsCustomClass() and store their per-class dispel set on group.coaRaidFilter instead of appending |RAID. scan() skips debuffs whose auraType is not in that set, preserving contiguous button layout with no gaps. Class → dispel types (sourced from coa-decursive): CHRONOMANCER Magic/Curse/Disease/Poison (Roll Back 804490) MONK Magic/Disease/Poison (Rebuke 525051) PROPHET Poison (Antivenom 800905; curse-dispel doesn't fire) PYROMANCER Disease/Poison RANGER Disease/Poison CULTIST Curse SONOFARUGAL Curse SPIRITMAGE Magic STARCALLER Magic WITCHHUNTER Curse --- ShadowedUnitFrames/modules/auras.lua | 42 ++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/ShadowedUnitFrames/modules/auras.lua b/ShadowedUnitFrames/modules/auras.lua index f0d98fa..8f95e0d 100644 --- a/ShadowedUnitFrames/modules/auras.lua +++ b/ShadowedUnitFrames/modules/auras.lua @@ -1,6 +1,34 @@ local Auras = {} local stealableColor = {r = 1, g = 1, b = 1} local playerUnits = {player = true, vehicle = true, pet = true} + +-- CoA: UnitAura "HARMFUL|RAID" only honours vanilla class dispels; custom classes +-- need a manual type check. playerCoaDispels is nil until first checked, false if +-- the player is not a dispelling CoA class, or a {type=true} set if they are. +local playerCoaDispels +local COA_CLASS_DISPELS = { + ["CHRONOMANCER"] = { Magic = true, Curse = true, Disease = true, Poison = true }, + ["MONK"] = { Magic = true, Disease = true, Poison = true }, + ["PROPHET"] = { Poison = true }, + ["PYROMANCER"] = { Disease = true, Poison = true }, + ["RANGER"] = { Disease = true, Poison = true }, + ["CULTIST"] = { Curse = true }, + ["SONOFARUGAL"] = { Curse = true }, + ["SPIRITMAGE"] = { Magic = true }, + ["STARCALLER"] = { Magic = true }, + ["WITCHHUNTER"] = { Curse = true }, +} +local function getCoaDispels() + if playerCoaDispels ~= nil then return playerCoaDispels end + local cp = _G.C_Player + if cp and cp.IsCustomClass and cp:IsCustomClass() then + local _, token = UnitClass("player") + playerCoaDispels = token and COA_CLASS_DISPELS[token] or false + else + playerCoaDispels = false + end + return playerCoaDispels +end local mainHand, offHand = {time = 0}, {time = 0} local tempEnchantScan ShadowUF:RegisterModule(Auras, "auras", ShadowUF.L["Auras"]) @@ -309,7 +337,17 @@ local function updateGroup(self, type, config, reverseConfig) -- This is a bit of an odd filter, when used with a HELPFUL filter, it will only return buffs you can cast on group members -- When used with HARMFUL it will only return debuffs you can cure if( config.raid ) then - group.filter = group.filter .. "|RAID" + local coa = group.type == "debuffs" and getCoaDispels() + if coa then + -- CoA custom class: keep filter as plain "HARMFUL" and let scan() + -- apply the per-type check via group.coaRaidFilter. + group.coaRaidFilter = coa + else + group.filter = group.filter .. "|RAID" + group.coaRaidFilter = nil + end + else + group.coaRaidFilter = nil end for id, button in pairs(group.buttons) do @@ -486,7 +524,7 @@ local function scan(parent, frame, type, config, filter) local name, rank, texture, count, auraType, duration, endTime, caster, isStealable = UnitAura(frame.parent.unit, index, filter) if( not name ) then break end - if( ( not config.player or playerUnits[caster] ) and ( not parent.whitelist[type] and not parent.blacklist[type] or parent.whitelist[type] and parent.whitelist[name] or parent.blacklist[type] and not parent.blacklist[name] ) ) then + if( ( not frame.coaRaidFilter or (auraType and frame.coaRaidFilter[auraType]) ) and ( not config.player or playerUnits[caster] ) and ( not parent.whitelist[type] and not parent.blacklist[type] or parent.whitelist[type] and parent.whitelist[name] or parent.blacklist[type] and not parent.blacklist[name] ) ) then -- Create any buttons we need frame.totalAuras = frame.totalAuras + 1 if( #(frame.buttons) < frame.totalAuras ) then