From efbc200ba7659f1151f130d685edd1687abbef3a Mon Sep 17 00:00:00 2001 From: Florian Berthold Date: Wed, 27 May 2026 22:55:04 +0200 Subject: [PATCH] fix(dispels): drop C_Player.IsCustomClass gate from getCoaDispels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Witchdoctor (and likely other CoA classes intermittently) never got the "On curable debuff" border highlight on raid/party frames: the C_Player.IsCustomClass() check in getCoaDispels could return false at scan time and cache playerCoaDispels = false, after which the highlight manual-scan path was never entered and the fallback RAID filter (which doesn't know about COA dispel spells) silently returned nothing. COA_CLASS_DISPELS only contains custom-class tokens (CHRONOMANCER, WITCHDOCTOR, MONK = Templar, PROPHET = Venomancer, etc.) so any token match already implies the player is a dispelling custom class — the IsCustomClass call is redundant. Trust the table directly. Vanilla classes whose tokens aren't in the table still get false → RAID filter path, unchanged. Bump v3.3.0-coa.2. --- ShadowedUnitFrames/ShadowedUnitFrames.toc | 2 +- ShadowedUnitFrames/modules/auras.lua | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ShadowedUnitFrames/ShadowedUnitFrames.toc b/ShadowedUnitFrames/ShadowedUnitFrames.toc index be67824..61eaa58 100644 --- a/ShadowedUnitFrames/ShadowedUnitFrames.toc +++ b/ShadowedUnitFrames/ShadowedUnitFrames.toc @@ -2,7 +2,7 @@ ## Title: Shadowed Unit Frames ## Notes: An apple a day keeps the raptor away, or so they say ## Author: Shadowed -## Version: v3.3.0 +## Version: v3.3.0-coa.2 ## SavedVariables: ShadowedUFDB ## OptionalDeps: Ace3, LibSharedMedia-3.0, LibHealComm-4.0, AceGUI-3.0-SharedMediaWidgets ## X-Curse-Packaged-Version: v3.2.12 diff --git a/ShadowedUnitFrames/modules/auras.lua b/ShadowedUnitFrames/modules/auras.lua index 847e972..db32685 100644 --- a/ShadowedUnitFrames/modules/auras.lua +++ b/ShadowedUnitFrames/modules/auras.lua @@ -26,18 +26,18 @@ local COA_CLASS_DISPELS = { } local function getCoaDispels() if playerCoaDispels ~= nil then return playerCoaDispels end - local cp = _G.C_Player - if not cp or not cp.IsCustomClass then - -- C_Player not yet initialised (called before PLAYER_LOGIN); don't - -- cache — retry on the next scan so we pick it up once in-world. + -- Trust the COA_CLASS_DISPELS table directly: it only contains custom-class + -- tokens, so any token-match implies the player IS a dispelling custom + -- class. Avoids C_Player.IsCustomClass timing/availability issues (the + -- API isn't reliable for every class on every login — Witchdoctor in + -- particular was getting cached as false on raid frames). + local _, token = UnitClass("player") + if not token or token == "" then + -- UnitClass not ready yet (very early init); don't cache — retry on + -- the next scan so we pick it up once in-world. return nil end - if cp:IsCustomClass() then - local _, token = UnitClass("player") - playerCoaDispels = token and COA_CLASS_DISPELS[token] or false - else - playerCoaDispels = false - end + playerCoaDispels = COA_CLASS_DISPELS[token] or false return playerCoaDispels end -- Expose for other modules (highlight.lua) so the dispel set stays single-source.