mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
make supermacro compatibility work with new slashcommands
This commit is contained in:
+11
-1
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user