From a570c4124553f507249c03e6f8c1022bbda025d1 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 17 Nov 2025 18:20:25 +0000 Subject: [PATCH] Add 'mine' parameter to ValidateUnitDebuff for personal debuff tracking - ValidateUnitDebuff now supports args.mine to filter player-cast debuffs - Fixes issue where personal debuffs (Rupture, Rip) from other players were incorrectly matched when checking timeleft - Shared stacking debuffs (Sunder Armor) continue to work as expected - Uses new lib:UnitDebuff filterCaster parameter internally --- Conditionals.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Conditionals.lua b/Conditionals.lua index e5416c8..5545d21 100644 --- a/Conditionals.lua +++ b/Conditionals.lua @@ -798,12 +798,17 @@ function CleveRoids.ValidateUnitDebuff(unit, args) if CleveRoids.libdebuff and CleveRoids.libdebuff.UnitDebuff then local atl = nil + local caster = nil + -- Determine caster filter: if args.mine is true, only match player-cast debuffs + local filterCaster = args.mine and "player" or nil + -- Check 1-32: debuff slots 1-16 + all 32 buff slots for overflow for idx = 1, 32 do - local effect, _, _, _, _, duration, timeleft = CleveRoids.libdebuff:UnitDebuff(unit, idx) + local effect, _, _, _, _, duration, timeleft, effectCaster = CleveRoids.libdebuff:UnitDebuff(unit, idx, filterCaster) if not effect then break end if effect == args.name then atl = (timeleft and timeleft >= 0) and timeleft or 0 + caster = effectCaster break end end