fix nampower errors

This commit is contained in:
Jrc13245
2025-12-24 15:05:51 -05:00
parent 167ab96d34
commit da23987449
5 changed files with 192 additions and 2 deletions
+21
View File
@@ -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