Reorganize debuff durations into personal and shared tables

Changes:
- Split lib.durations into lib.personalDebuffs and lib.sharedDebuffs
- Removed combo-scaling spells (Rupture, Rip, Kidney Shot) from static tables
  since they are handled dynamically by ComboPointTracker
- Added lib:IsPersonalDebuff() helper to distinguish debuff types
- Updated ValidateUnitDebuff to auto-detect personal vs shared debuffs
- Personal debuffs (DoTs, poisons, most CC) now auto-filter to player by default
- Shared debuffs (Sunder, Faerie Fire, Hunter's Mark) remain unfiltered
- Maintained lib.durations for backwards compatibility

This prevents false positives when checking personal debuffs like Rupture
in multi-player scenarios while allowing shared debuffs like Sunder Armor
to work correctly.
This commit is contained in:
Claude
2025-11-17 18:28:58 +00:00
parent a570c41245
commit b8cc607d90
2 changed files with 110 additions and 50 deletions
+24 -2
View File
@@ -799,8 +799,20 @@ 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
-- Auto-detect if this is a personal debuff (unless explicitly overridden)
local filterCaster = nil
if args.mine == true then
-- User explicitly requested player-only filtering
filterCaster = "player"
elseif args.mine == false then
-- User explicitly requested no filtering
filterCaster = nil
else
-- Auto-detect based on spell type (if available and personal, filter to player)
-- We'll determine this during the search
filterCaster = nil
end
-- Check 1-32: debuff slots 1-16 + all 32 buff slots for overflow
for idx = 1, 32 do
@@ -809,8 +821,18 @@ function CleveRoids.ValidateUnitDebuff(unit, args)
if effect == args.name then
atl = (timeleft and timeleft >= 0) and timeleft or 0
caster = effectCaster
-- Auto-detect: If args.mine not specified and this is a personal debuff, only match player casts
if args.mine == nil and spellID and CleveRoids.libdebuff.IsPersonalDebuff then
if CleveRoids.libdebuff:IsPersonalDebuff(spellID) and caster ~= "player" then
-- This is a personal debuff from another player, skip it
atl = nil
goto continue
end
end
break
end
::continue::
end
if atl ~= nil then
return cmp[args.operator](atl, args.amount)