mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
Add conditional support to /equipset via ClassicAPI equipment sets
ClassicAPI registers a bare /equipset that resolves a name and calls C_EquipmentSet.UseEquipmentSet with no conditional layer. DoEquipSet routes it through DoWithConditionals like the other /equip* commands, so it gains [combat]/[mod]/@unit/etc. and ';'-separated fallthrough (first set whose conditionals pass wins). Console.lua reclaims the EQUIP_SET handler (keeping ClassicAPI's localized aliases) and falls back to registering /equipset itself if the API command isn't present.
This commit is contained in:
+10
@@ -63,6 +63,16 @@ SlashCmdList.EQSLOT13 = CleveRoids.DoEquipTrinket1
|
||||
SLASH_EQSLOT141 = "/equip14"
|
||||
SlashCmdList.EQSLOT14 = CleveRoids.DoEquipTrinket2
|
||||
|
||||
-- Reclaim ClassicAPI's /equipset (command name EQUIP_SET) so it supports
|
||||
-- conditionals. ClassicAPI registers the localized aliases against EQUIP_SET;
|
||||
-- swapping the handler keeps every alias and adds the conditional engine.
|
||||
if SlashCmdList.EQUIP_SET then
|
||||
SlashCmdList.EQUIP_SET = CleveRoids.DoEquipSet
|
||||
else
|
||||
SLASH_EQUIPSET1 = "/equipset"
|
||||
SlashCmdList.EQUIPSET = CleveRoids.DoEquipSet
|
||||
end
|
||||
|
||||
SLASH_UNSHIFT1 = "/unshift"
|
||||
|
||||
SlashCmdList.UNSHIFT = CleveRoids.DoUnshift
|
||||
|
||||
Reference in New Issue
Block a user