- Added lib:UnitBuff(unit, index, filterCaster) to query buff data by slot
- Added lib:FindPlayerBuff(unit, spellID) to find player-cast buffs by spell ID
- Both functions return duration, timeleft, and caster information
- Mirrors the debuff tracking API (UnitDebuff/FindPlayerDebuff)
- Enables tracking buff ownership and timeleft for future projects
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.
- Modified lib:UnitDebuff() to accept optional filterCaster parameter
- Added lib:FindPlayerDebuff() to search for player debuffs by spell ID
- Ensures debuffs in buff slots can be properly identified by owner
- Prevents false positives from other players' debuffs with same spell ID
Applied the same overflow bug fixes to the combodurations branch to ensure
compatibility with combo point-scaled debuffs. This fixes three issues:
1. lib:UnitDebuff() (line 799): Fixed UnitBuff() return value capture from 4
values to 3 values (UnitBuff only returns texture, stacks, spellID). Also
changed overflow check from only checking static database to checking
lib:GetDuration() which includes combo durations, learned durations, and
static durations.
2. SeedUnit() debuff loop (line 837): Changed check from only lib.durations[]
to lib:GetDuration() so debuffs with learned or combo-scaled durations are
properly seeded into the tracking system.
3. SeedUnit() buff loop (line 867): Fixed UnitBuff() return value capture from
4 values to 3, and changed check from only lib.durations[] to
lib:GetDuration() to properly track overflow debuffs with combo-scaled or
learned durations.
These fixes ensure that:
- Overflow debuffs like Moonfire are properly detected by [nodebuff:] conditionals
- Duration tracking works for overflow debuffs with combo point scaling (Rip, Rupture)
- Duration tracking works for overflow debuffs with learned durations
- All existing combo point tracking functionality is preserved
After analyzing pfUI's cooldown module, we need to directly sync
combo durations to pfUI's libdebuff.objects storage:
- Added SyncComboDurationToPfUI function to force-update pfUI's
stored debuff duration after tracking combo spells
- Called from UNIT_CASTEVENT handler after AddEffect
- This ensures pfUI's cooldown display shows the correct combo
duration (e.g., 28s for 5 CP Rip) instead of base 12s
pfUI's cooldown module is just a display layer - it shows durations
from pfUI.api.libdebuff.objects. By directly updating this storage,
we ensure the correct duration is displayed regardless of timing.