Add ClassicAPI dispel-type conditionals via C_UnitAuras

Introduce ClassicAPI.lua, a feature-detection layer for the ClassicAPI
client mod that mirrors NampowerAPI's HasMinimumVersion pattern
(IsAvailable / HasMinimumVersion / HasUnitAuras). UnitHasDispelType
scans a unit's auras via C_UnitAuras and reports the dispel type,
scanning debuffs or buffs based on a helpful flag.

Add conditionals backed by it:
- Debuff side (defensive cleanse): [magic] [curse] [disease] [poison]
  [dispellable] + negations
- Buff side (offensive dispel/strip): [magicbuff] [dispellablebuff]
  + negations

All are no-arg booleans, default to @target (honor @unit), and degrade
gracefully without ClassicAPI: positive checks return false, negated
return true, since vanilla cannot read aura dispel types. The existing
ValidateAura path is untouched. MacroErrorChecker auto-accepts them via
the Keywords table; they're registered in BOOLEAN_CONDITIONALS so they
parse as flags. Loaded after NampowerAPI in the TOC.
This commit is contained in:
Brues
2026-06-20 23:03:23 -05:00
parent 86d16f507b
commit c05fc754e6
5 changed files with 221 additions and 3 deletions
+15
View File
@@ -152,6 +152,21 @@ local BOOLEAN_CONDITIONALS = {
nopet = true,
bg = true,
nobg = true,
-- Dispel-type conditionals (ClassicAPI C_UnitAuras)
magic = true,
nomagic = true,
curse = true,
nocurse = true,
disease = true,
nodisease = true,
poison = true,
nopoison = true,
dispellable = true,
nodispellable = true,
magicbuff = true,
nomagicbuff = true,
dispellablebuff = true,
nodispellablebuff = true,
}
local requirementCheckFrame = CreateFrame("Frame")