mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
fix nampower errors
This commit is contained in:
@@ -2517,6 +2517,10 @@ local function _stopCastingAction()
|
||||
SpellStopCasting()
|
||||
end
|
||||
|
||||
local function _clearTargetAction()
|
||||
ClearTarget()
|
||||
end
|
||||
|
||||
-- Attempts to conditionally stop an attack. Returns false if no conditionals are found.
|
||||
function CleveRoids.DoConditionalStopAttack(msg)
|
||||
if not string.find(msg, "%[") then return false end
|
||||
@@ -2545,6 +2549,20 @@ function CleveRoids.DoConditionalStopCasting(msg)
|
||||
return false
|
||||
end
|
||||
|
||||
-- Attempts to conditionally clear target. Returns false if no conditionals are found.
|
||||
function CleveRoids.DoConditionalClearTarget(msg)
|
||||
if not string.find(msg, "%[") then return false end
|
||||
|
||||
-- PERFORMANCE: Use numeric iteration to avoid pairs() iterator allocation
|
||||
local parts = CleveRoids.splitStringIgnoringQuotes(msg)
|
||||
for i = 1, table.getn(parts) do
|
||||
if CleveRoids.DoWithConditionals(parts[i], nil, CleveRoids.FixEmptyTarget, false, _clearTargetAction) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
-- Attempts to use or equip an item by a set of conditionals
|
||||
-- Also checks if a condition is a spell so that you can mix item and spell use
|
||||
@@ -4265,6 +4283,9 @@ function CleveRoids.Frame:PLAYER_TARGET_CHANGED()
|
||||
CleveRoids.CurrentSpell.autoAttack = false
|
||||
CleveRoids.CurrentSpell.autoAttackLock = false
|
||||
|
||||
-- Clear resist state when target changes
|
||||
CleveRoids.ClearResistState()
|
||||
|
||||
-- Reset any sequence with reset=target that has progressed past the first step
|
||||
for _, sequence in pairs(CleveRoids.Sequences) do
|
||||
if sequence.index > 1 and sequence.reset and sequence.reset.target then
|
||||
|
||||
Reference in New Issue
Block a user