coa: fix "Show curable only" debuff filter for CoA custom classes
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
This commit is contained in:
@@ -1,6 +1,34 @@
|
|||||||
local Auras = {}
|
local Auras = {}
|
||||||
local stealableColor = {r = 1, g = 1, b = 1}
|
local stealableColor = {r = 1, g = 1, b = 1}
|
||||||
local playerUnits = {player = true, vehicle = true, pet = true}
|
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 mainHand, offHand = {time = 0}, {time = 0}
|
||||||
local tempEnchantScan
|
local tempEnchantScan
|
||||||
ShadowUF:RegisterModule(Auras, "auras", ShadowUF.L["Auras"])
|
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
|
-- 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
|
-- When used with HARMFUL it will only return debuffs you can cure
|
||||||
if( config.raid ) then
|
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
|
end
|
||||||
|
|
||||||
for id, button in pairs(group.buttons) do
|
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)
|
local name, rank, texture, count, auraType, duration, endTime, caster, isStealable = UnitAura(frame.parent.unit, index, filter)
|
||||||
if( not name ) then break end
|
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
|
-- Create any buttons we need
|
||||||
frame.totalAuras = frame.totalAuras + 1
|
frame.totalAuras = frame.totalAuras + 1
|
||||||
if( #(frame.buttons) < frame.totalAuras ) then
|
if( #(frame.buttons) < frame.totalAuras ) then
|
||||||
|
|||||||
Reference in New Issue
Block a user