mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user