mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
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:
+6
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user