From 12e61875e22d3c8e684cb98da70bf7438228c539 Mon Sep 17 00:00:00 2001 From: Jrc13245 Date: Sun, 5 Oct 2025 13:32:16 -0400 Subject: [PATCH] fix vanish tooltip and timers --- Conditionals.lua | 9 ++++----- Core.lua | 13 ++++++++++--- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Conditionals.lua b/Conditionals.lua index 5f48f3d..ca9e5f5 100644 --- a/Conditionals.lua +++ b/Conditionals.lua @@ -655,6 +655,7 @@ function CleveRoids.ValidateUnitDebuff(unit, args) if type(args) ~= "table" then args = { name = args } end + if not args.name then return false end local found = false local texture, stacks, spellID, remaining @@ -738,12 +739,10 @@ function CleveRoids.ValidateUnitDebuff(unit, args) -- Time-left compare path if unit == "player" then - -- Player auras already have 'remaining' - local tl = (found and remaining) or nil - if tl == nil then - -- Debuff not present: treat as expired (0 seconds) - return cmp[args.operator](0, args.amount) + if not found then + return false -- debuff doesn't exist, fail the check end + local tl = remaining or 0 return cmp[args.operator](tl, args.amount) else -- Non-player: try pfUI → internal libdebuff → 0s diff --git a/Core.lua b/Core.lua index 75b1ea5..0dcc532 100644 --- a/Core.lua +++ b/Core.lua @@ -207,9 +207,10 @@ function CleveRoids.GetSpellCost(spellSlot, bookType) if not reagent then local name = GetSpellName(spellSlot, bookType) - -- Strip rank from name for lookup - local baseName = string.gsub(name or "", "%s*%(.-%)%s*$", "") - reagent = _ReagentBySpell[baseName] + if name then + name = string.gsub(name, "%s*%(.-%)%s*$", "") -- strip "(Rank X)" + reagent = _ReagentBySpell[name] + end end return (cost and tonumber(cost) or 0), (reagent and tostring(reagent) or nil) @@ -903,6 +904,12 @@ function CleveRoids.ParseMsg(msg) else conditionals[condition] = conditionals.action end + else + -- existing code for when conditionals[condition] already exists + if type(conditionals[condition]) ~= "table" then + conditionals[condition] = { conditionals[condition] } + end + table.insert(conditionals[condition], conditionals.action) end else -- Has args. Ensure the key's value is a table and add new arguments.