Commit Graph
93 Commits
Author SHA1 Message Date
Claude ea3bf79ffc Extend overflow debuff checking to all 32 buff slots
Previously, lib:UnitDebuff() callers only looped through indices 1-16, which
meant overflow debuffs in buff slots 17-32 were never detected.

Changed loop range from 1-16 to 1-32:
- _get_debuff_timeleft() loops (Conditionals.lua:93, 105)
- ValidateUnitDebuff() loop (Conditionals.lua:802)
- Added missing "if not effect then break end" check (Conditionals.lua:804)

How lib:UnitDebuff(unit, index) works:
- Index 1-16: Checks debuff slot, falls back to buff slot at same index
- Index 17-32: No debuff slots exist, so checks buff slots 17-32

Since a debuff can only exist in ONE location (either debuff slot OR buff slot),
checking 1-32 covers all 16 debuff slots + all 32 buff slots efficiently.
2025-11-16 23:46:16 +00:00
Claude 2935e036d4 Fix debuff overflow duration tracking for learned durations
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.
2025-11-16 23:20:48 +00:00
Claude 67c639d04d Fix debuff overflow detection by correctly capturing UnitBuff return values
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.
2025-11-16 23:16:16 +00:00
Jrc13245 edfb44edd7 another fix 2025-11-16 10:03:56 -05:00
Jrc13245 68ea467e1a fix gitignore 2025-11-16 10:02:38 -05:00
Jrc13245 03bfa82d87 update readme 2025-11-16 09:59:59 -05:00
Jrc13245 93c73e8d93 update readme 2025-11-16 09:56:54 -05:00
Jrc13245 1610920dda immunity tracking system 2025-11-16 09:46:51 -05:00
Torio 96e3c9b90e Delete .gitignore 2025-11-16 09:46:37 -05:00
Torio 8449dd3382 Merge pull request #21 from AdmiralFrijoles/main
New conditionals level and mylevel
2025-11-14 07:18:30 -05:00
Jrc13245 122fc0a908 no longer require abilities on actionbar to get icon 2025-11-13 16:40:37 -05:00
Jrc13245 92562ab1a4 Fix macro icons with syntax not using conditionals and fix imbue conditionals 2025-11-13 15:46:00 -05:00
Jrc13245 c65642a129 fix compatibility with pfui macrotweak 2025-11-12 16:33:54 -05:00
Jrc13245 642e58598a fix item macros icons when swapped 2025-11-12 16:19:08 -05:00
Jrc13245 a3b8848449 fix conditionals icons when used with slot numbers 2025-11-11 15:14:06 -05:00
Jrc13245 b9cd6a8802 make buff and debuff validations exact buff names and not string parts 2025-11-11 11:08:37 -05:00
Jrc13245 1b1d4fe94b revert some changes 2025-11-10 19:59:13 -05:00
Jrc13245 914d9ab916 fix errors ddue to missing comma 2025-11-10 19:45:44 -05:00
Jrc13245 4920675a3a fix errors 2025-11-10 19:38:44 -05:00
Jrc13245 84f5d63be8 fix new conditionals 2025-11-10 19:09:01 -05:00
Jrc13245 b18ad521de readme update 2025-11-10 18:05:23 -05:00
Jrc13245 e088ae4029 new weapon imbue check conditionals 2025-11-10 18:02:59 -05:00
Jrc13245 4661f0f924 more equip fixes 2025-11-09 13:09:16 -05:00
Jrc13245 1427c4481f fix equip errors 2025-11-09 12:48:56 -05:00
Jrc13245 5845e811b4 update reactive and add usable conditionals 2025-11-08 18:13:24 -05:00
Jrc13245 19be3b70d7 fix equipmh and equipoh errors 2025-11-08 17:53:19 -05:00
Jrc13245 37490c5af6 fix accidentally removed mybuffcount 2025-11-08 17:41:22 -05:00
Jrc13245 c8017c5485 implement UnitXP functions and update nampower and superwow functions 2025-11-08 17:38:35 -05:00
Jrc13245 b43f71df2d gitignore 2025-11-08 11:26:21 -05:00
Jrc13245 af872faa58 update readme add mybuffcount conditional 2025-11-08 11:15:33 -05:00
Jrc13245 ca62efec2a fix cooldown conditional with no argument 2025-11-08 11:11:26 -05:00
Jrc13245 5b416765da fix more equip errors 2025-10-30 14:08:41 -04:00
Jrc13245 a7e6ee88ad fix equip race conditions 2025-10-29 18:59:59 -04:00
Jrc13245 f4aed363b6 update readme 2025-10-29 13:49:31 -04:00
Jrc13245 f5163f7e57 improve target with conditionals functionality 2025-10-29 13:46:42 -04:00
Jrc13245 8fcd17ff53 added ability to track overflow debuffs that show in buff slots on bosses in raids 2025-10-28 19:56:00 -04:00
Jrc13245 8be3d7df3a fix some tooltip errors 2025-10-28 19:43:39 -04:00
Jrc13245 6229cc0f7b update readme with swimming conditional 2025-10-26 14:55:52 -04:00
Jrc13245 c86875849f swimming conditional for druid only 2025-10-26 14:53:42 -04:00
Jrc13245 18f7828c26 fix non-letter or number characters in item or spell names 2025-10-26 12:48:29 -04:00
Jrc13245 6db708f40b fix castsequence reset functionality 2025-10-25 11:34:36 -04:00
Jrc13245 f785990eb5 update readme 2025-10-21 22:26:30 -04:00
Jrc13245 8542a05170 implement standalone debuff timer system 2025-10-21 22:18:10 -04:00
Jrc13245 0f3078d52b fix quotational spells or items used with validatecooldown 2025-10-15 16:33:51 -04:00
Jrc13245 959337f1ff update readme 2025-10-15 16:20:17 -04:00
Jrc13245 80382638cd allow stat conditional to be multi 2025-10-15 16:19:19 -04:00
Jrc13245 4c9c6fff60 new pet conditional 2025-10-08 20:46:03 -04:00
Jrc13245 49d55f5205 fix cooldown conditionals for items 2025-10-07 14:34:35 -04:00
Torio 2f1611ba60 Update Conditionals.lua 2025-10-07 11:08:58 -04:00
Jrc13245 745ebb0c79 fix use to work with itemid parsing 2025-10-07 08:47:53 -04:00