Fixed three issues preventing overflowed debuffs from being properly tracked
with duration information, especially for debuffs with learned durations:
1. lib:UnitDebuff() (line 760): Changed overflow check from only checking
static database (lib.durations[spellID]) to also checking learned durations
via lib:GetDuration(spellID). This allows overflowed debuffs with learned
durations to be properly returned.
2. SeedUnit() UnitBuff loop (line 807): Fixed incorrect UnitBuff() return value
capture - was trying to get 4 values when it only returns 3, causing spellID
to always be nil.
3. SeedUnit() both loops (lines 797, 810): Changed to use lib:GetDuration()
instead of only checking lib.durations[], so both regular debuffs AND
overflowed debuffs with learned durations are properly seeded into the
tracking system.
This ensures debuff conditionals like [debuff:Moonfire<4] work correctly for
overflowed debuffs, even if the duration was learned rather than in the
static database.
Fixed a critical bug where UnitBuff() calls in Utility.lua were incorrectly
capturing 4 return values instead of 3, causing the spell ID variable to
receive nil instead of the actual spell ID. This broke debuff overflow
detection where debuffs shown as buffs would not be properly identified.
According to SuperWoW documentation, the API returns:
- UnitBuff(unit, index) → texture, stacks, spellID (3 values)
- UnitDebuff(unit, index) → texture, stacks, debuffType, spellID (4 values)
Changes:
- Fixed lib:UnitDebuff() overflow fallback in Utility.lua:758
- Fixed GetUnitBuffs() helper function in Utility.lua:1108
- Fixed buff checking in CheckImmunity() function in Utility.lua:1282
- Reverted incorrect changes to Conditionals.lua (was already correct)
This resolves the issue where macros like [nodebuff:Moonfire] would spam cast
when the debuff had overflowed and was showing as a buff on the target.