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
This commit is contained in:
Claude
2025-11-17 18:20:25 +00:00
parent 7de3ac4043
commit a570c41245
+6 -1
View File
@@ -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