make supermacro compatibility work with new slashcommands

This commit is contained in:
Jrc13245
2026-01-22 17:46:03 -05:00
parent 36f79938cf
commit cbbc4cc5a7
18 changed files with 136 additions and 12 deletions
+11 -1
View File
@@ -86,7 +86,17 @@ end
-- This ensures we have a fallback for non-conditional use.
local StartAttack = function(msg)
if not UnitExists("target") or UnitIsDead("target") then TargetNearestEnemy() end
if not CleveRoids.CurrentSpell.autoAttack and not CleveRoids.CurrentSpell.autoAttackLock and UnitExists("target") and UnitCanAttack("player","target") then
-- Check both event-based flag AND action bar state for reliable detection
local isAttacking = CleveRoids.CurrentSpell.autoAttack
if not isAttacking then
-- Fallback: check action bar state via IsCurrentAction
local slot = CleveRoids.GetProxyActionSlot(CleveRoids.Localized.Attack)
if slot and IsCurrentAction(slot) then
CleveRoids.CurrentSpell.autoAttack = true
isAttacking = true
end
end
if not isAttacking and not CleveRoids.CurrentSpell.autoAttackLock and UnitExists("target") and UnitCanAttack("player","target") then
CleveRoids.CurrentSpell.autoAttackLock = true
CleveRoids.autoAttackLockElapsed = GetTime()
AttackTarget()