|
|
|
@@ -21,23 +21,23 @@ local COA_CLASS_DISPELS = {
|
|
|
|
|
["WITCHHUNTER"] = { Curse = true },
|
|
|
|
|
["SUNCLERIC"] = { Magic = true, Disease = true, Poison = true }, -- Sanctify
|
|
|
|
|
["WILDWALKER"] = { Disease = true, Poison = true }, -- Primalist (Soothing Touch — DBC says Magic, gameplay is Poison/Disease)
|
|
|
|
|
["WITCHDOCTOR"] = { Disease = true, Poison = true }, -- Cleansing Idol (AoE)
|
|
|
|
|
["WITCHDOCTOR"] = { Curse = true, Disease = true, Poison = true }, -- Hexbreak (806240, single-target Curse) + Cleansing Idol (504840, AoE Disease/Poison)
|
|
|
|
|
["TINKER"] = { Disease = true, Poison = true }, -- Nanobot Cleanser
|
|
|
|
|
}
|
|
|
|
|
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.
|
|
|
|
|