Commit Graph
38 Commits
Author SHA1 Message Date
Claude 62c39f71cf Fix Lua 5.1 compatibility: remove goto statement from ValidateUnitDebuff
- Replaced goto/label with shouldSkip flag variable
- Lua 5.1 (used in WoW 1.12) doesn't support goto statements
- Functionality remains identical
2025-11-17 18:35:32 +00:00
Claude b8cc607d90 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.
2025-11-17 18:28:58 +00:00
Claude a570c41245 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
2025-11-17 18:20:25 +00:00
Torio 55c0b2d0cf Merge pull request #45 from jrc13245/main
fix debuff validation
2025-11-16 18:59:20 -05:00
Claude 30bb3599fb 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:47:08 +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 1610920dda immunity tracking system 2025-11-16 09:46:51 -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 92562ab1a4 Fix macro icons with syntax not using conditionals and fix imbue conditionals 2025-11-13 15:46:00 -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 914d9ab916 fix errors ddue to missing comma 2025-11-10 19:45:44 -05:00
Jrc13245 84f5d63be8 fix new conditionals 2025-11-10 19:09:01 -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 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 ca62efec2a fix cooldown conditional with no argument 2025-11-08 11:11:26 -05:00
Jrc13245 c86875849f swimming conditional for druid only 2025-10-26 14:53:42 -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 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 ccc62d6782 fix inventory slots and itemids being mistaken as eachother 2025-10-07 08:38:40 -04:00
Jrc13245 03f7e7e8b0 cleanup 2025-10-05 14:28:02 -04:00
Jrc13245 35a81eb29b many fixes 2025-10-05 14:24:46 -04:00
Jrc13245 12e61875e2 fix vanish tooltip and timers 2025-10-05 13:32:16 -04:00
Jrc13245 77c420fd59 fix cooldown timers for non pfui users and make trinket slot use usage respect conditionals and fix vanish reagent tooltip 2025-10-05 13:03:05 -04:00
Jrc13245 a3169a7523 fix debuff timers for non pfui users 2025-10-02 13:22:47 -04:00
Jrc13245 0e564dd8bc use pfui debuff timers for cheching debuff timers fixing debuff conditional usage 2025-09-30 17:51:34 -04:00
Jason Gagner cc12682c76 New conditionals level and mylevel 2025-09-21 11:16:04 -04:00
Jrc13245 fe83793c0b new conditional druidmana 2025-09-06 20:02:12 -04:00
Jrc13245 815ed9d4f3 fix buff and nobuff 2025-08-24 19:57:59 -04:00
Jrc13245 fb359993b2 Initial Commit 2025-08-18 16:15:25 -04:00