fix no conditional cancelaura

This commit is contained in:
Jrc13245
2025-08-29 18:59:44 -04:00
parent 2da28c2653
commit f9110bfe55
2 changed files with 28 additions and 11 deletions
+27 -11
View File
@@ -1577,17 +1577,18 @@ function CleveRoids.DoCastSequence(sequence)
end
end
-- Core.lua
CleveRoids.DoConditionalCancelAura = function(msg)
local trimmedMsg = CleveRoids.Trim(msg or "")
local s = CleveRoids.Trim(msg or "")
if s == "" then return false end
if trimmedMsg == "" then
return false
end
if CleveRoids.DoWithConditionals(trimmedMsg, nil, CleveRoids.FixEmptyTarget, false, CleveRoids.CancelAura) then
return true
else
return false
end
-- No conditionals? cancel immediately.
if not string.find(s, "%[") then
return CleveRoids.CancelAura(s)
end
-- Has conditionals? Let the framework evaluate them, then run CancelAura.
return CleveRoids.DoWithConditionals(s, nil, CleveRoids.FixEmptyTarget, false, CleveRoids.CancelAura) or false
end
function CleveRoids.OnUpdate(self)
@@ -1852,8 +1853,23 @@ function GetActionCount(slot)
if action.active.item then
count = action.active.item.count
elseif action.active.spell and action.active.spell.reagent then
count = CleveRoids.GetReagentCount(action.active.spell.reagent)
elseif action.active.spell then
local reagent = action.active.spell.reagent
if not reagent then
local ss, bt = action.active.spell.spellSlot, action.active.spell.bookType
if ss and bt then
local _, r = CleveRoids.GetSpellCost(ss, bt)
reagent = r
end
if (not reagent) and _ReagentBySpell and action.active.spell.name then
reagent = _ReagentBySpell[action.active.spell.name] -- e.g., Vanish → Flash Powder
end
action.active.spell.reagent = reagent -- cache it so we dont re-scan every frame
end
if reagent then
count = CleveRoids.GetReagentCount(reagent) -- id-first bag scan, falls back to name/tooltip
end
end
end
+1
View File
@@ -32,3 +32,4 @@ Extensions\Mouseover\sRaidFrames.lua
Extensions\Mouseover\ag_UnitFrames.lua
Extensions\Tooltip\Generic.lua