Commit Graph

41 Commits

Author SHA1 Message Date
Jrc13245 003d230e52 revert multi target tracker 2026-01-02 23:16:57 -05:00
Jrc13245 6af06f1ee3 feature addition multi target debuff tracker 2026-01-02 15:52:55 -05:00
Jrc13245 3ccaec5e32 fix pounce immunity detection, stale carnage duration override bug, and immune conditionals 2025-12-29 22:35:34 -05:00
Jrc13245 a381d4bf1b update pounce to add npc to bleed immune or stun immune 2025-12-28 20:29:07 -05:00
Jrc13245 c0d4f88fe9 fix FF Feral parsing 2025-12-28 19:08:24 -05:00
Jrc13245 723cbb0642 update debuff duration systems 2025-12-28 08:32:06 -05:00
Jrc13245 370167b3a7 update for nampower errors 2025-12-27 14:38:24 -05:00
Jrc13245 ca50bb5b55 fix icon out of range on self cast spells and nil check for combodurations 2025-12-22 12:05:20 -05:00
Jrc13245 30631bde26 remove login spam and fix immunity auto tracking 2025-11-28 07:44:42 -05:00
Jrc13245 ff6ec25c06 bleed immunity, fix icons and their tooltips with no available actions, reformat readme 2025-11-27 09:21:41 -05:00
Jrc13245 6261785507 memory and cpu usage overhaul 2025-11-25 07:41:04 -05:00
Jrc13245 f6df0b2b5a fix icon issue and fix carnage talent duration refreshers updating visually for pfui 2025-11-19 17:50:30 -05:00
Jrc13245 274475a312 add carnage talent refreshing rip and rake if using ferocious bite at 5 combo points when debuffs are up 2025-11-18 19:39:07 -05:00
Jrc13245 77be86cf17 improve tracking of combo points and spellcasts across all ways to cast spells 2025-11-18 17:01:43 -05:00
Jrc13245 7fd94e3ed2 Add talent and equipment modifier systems for debuff durations
- Talent modifiers: Taste for Blood, Improved Gouge, Improved Shadow Word: Pain
- Equipment modifiers: Black Morass Idol (Rip -10% duration)
- Layered calculation: (base + combo + talent) × equipment
- Console commands: /cleveroid talents, testtalent, testequip
- Auto-detection via GetTalentInfo() and GetInventoryItemLink()
2025-11-18 15:42:38 -05:00
Jrc13245 c5a57af024 Fix combo point tracking and queue glow for instant finishers
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 20:28:22 -05:00
Torio 2f90199a26 Merge pull request #63 from jrc13245/claude/fix-combo-point-tracking-01GZH7rgqnupQ3MwLRbUCjF5
Remove complex logic from CastSpell/UseAction hooks to fix action bars
2025-11-17 17:15:58 -05:00
Claude bdb78b7fda Remove complex logic from CastSpell/UseAction hooks to fix action bars
The CastSpell and UseAction hooks were doing too much work (tooltip
manipulation, spell name detection, combo point tracking) which was
interfering with WoW's action bar icon updates.

Solution:
Made both hooks minimal pass-throughs that just call and return the
original function. Combo point tracking is now handled entirely by:

1. UpdateComboPoints() - runs continuously via OnUpdate, captures
   combo points as they're generated and stores in lastComboPoints

2. SPELLCAST_START event - fires for ALL spell casts regardless of
   source (spellbook, action bar, macro, keybind) and calls
   TrackComboPointCast()

3. TrackComboPointCast() - uses GetComboPoints() first, falls back
   to lastComboPoints if points are already consumed

This approach works for all casting methods:
- Spellbook clicks
- Action bar clicks
- Keybinds
- Macros with /cast
- Macros with conditionals

And doesn't interfere with action bar icon updates (GCD, range
coloring, queue glowing, etc).
2025-11-17 22:14:41 +00:00
Torio 62a4b4a5e6 Merge pull request #60 from jrc13245/claude/fix-combo-point-tracking-01GZH7rgqnupQ3MwLRbUCjF5
Claude/fix combo point tracking 01 gzh7rgqnup q3 mw l rb u cj f5
2025-11-17 16:44:13 -05:00
Claude 56de67332c Fix action bar icon behavior by properly returning hook values
The CastSpell and UseAction hooks were breaking action bar icon
updates (GCD display, range coloring, queue glowing) because they
weren't returning the values from the original functions.

Issues fixed:
1. Return values: Both hooks now capture and return all return values
   from the original functions, ensuring the game receives the expected
   data for action bar updates

2. Error protection: Wrapped all tracking code in pcall() to prevent
   any errors from breaking the normal spell cast flow

3. Tooltip interference: UseAction now uses a separate hidden tooltip
   (CleveRoidsComboTooltip) instead of manipulating GameTooltip,
   avoiding interference with the main UI tooltip

Changes to CastSpell hook:
- Use pcall for GetSpellName to safely handle errors
- Capture return values: result1, result2, result3
- Wrap tracking code in pcall for error protection
- Return all captured values

Changes to UseAction hook:
- Wrap entire spell name detection in pcall
- Create separate hidden tooltip for combo point spells
- Capture return values from original UseAction
- Wrap tracking code in pcall for error protection
- Return all captured values

This ensures action bar icons work correctly while still tracking
combo points for finisher spells.
2025-11-17 21:42:52 +00:00
Claude 2276daffdd Fix combo point tracking for spellbook and action bar casts
The CastSpell and UseAction hooks were only confirming existing
tracking, not actually creating it. They also called the original
functions before capturing combo points, so the points were already
consumed.

Changes to CastSpell hook (spellbook casts):
- Get spell name BEFORE calling original CastSpell
- Capture combo points to lastComboPoints if spell is combo scaling
- Call original to cast the spell
- Call TrackComboPointCast to track the combo points used
- Confirm the tracking

Changes to UseAction hook (action bar casts):
- Get spell name from action slot BEFORE calling original UseAction
- Fixed tooltip logic (was checking "not GetActionText" incorrectly)
- Capture combo points to lastComboPoints if spell is combo scaling
- Call original to execute the action
- Call TrackComboPointCast to track the combo points used
- Confirm the tracking

Both hooks now capture combo points at the exact moment before the
spell is cast, ensuring they're available in lastComboPoints for
TrackComboPointCast to use as a fallback.

This fixes tracking for:
- Clicking spells from spellbook (CastSpell)
- Clicking spells on action bars (UseAction)
- Keybinding spells on action bars (UseAction)
2025-11-17 21:34:43 +00:00
Claude 84a781a5fc Fix combo point tracking to use continuous tracking system
Previously, combo point tracking attempted to capture combo points at
cast time in the hooks, but this approach failed because hooks run
after the spell has already consumed the combo points.

The solution is to rely entirely on the existing UpdateComboPoints()
system, which runs continuously via OnUpdate and PLAYER_COMBO_POINTS
events. This system tracks combo points AS THEY ARE GENERATED on the
target, storing them in lastComboPoints before any spell can consume
them.

Changes:
- Removed manual combo point capture logic from all hooks
  (CastSpellByName_Hook, CastSpell_Hook, DoCast, OnSpellcastStart)
- TrackComboPointCast() now relies solely on the continuous tracking
  system, falling back to lastComboPoints when GetComboPoints()
  returns 0 (because points were already consumed)
- UpdateComboPoints() continues to run on every frame, capturing
  combo points as they appear on the target

This ensures that all casts of combo point finisher spells (Rip,
Rupture, Kidney Shot) are tracked correctly with the actual number
of combo points used, regardless of whether they're cast through
conditionals (e.g., /cast [combo:>0]Rip) or directly (e.g., /cast Rip).
2025-11-17 21:28:41 +00:00
Claude 6f968f8539 Fix combo point tracking for all casts regardless of conditionals
Previously, combo point tracking only worked reliably when spells were
cast with conditionals (e.g., /cast [combo:>0]Rip) but not for direct
casts (e.g., /cast Rip). This was because combo points are consumed
immediately when a spell is cast, so by the time the tracking code ran,
GetComboPoints() would return 0.

Changes:
- Updated TrackComboPointCast() to fall back to lastComboPoints when
  GetComboPoints() returns 0, ensuring the correct combo point count
  is used even if the points have already been consumed
- Modified all spell cast hooks (CastSpellByName_Hook, CastSpell_Hook,
  DoCast integration, OnSpellcastStart) to capture the current combo
  points into lastComboPoints BEFORE the spell is cast
- Added debug messages to track when combo points are captured and
  when fallback values are used

This ensures that all casts of combo point finisher spells (Rip,
Rupture, Kidney Shot) are tracked correctly with the actual number
of combo points used, regardless of whether they're cast through
conditionals or directly.
2025-11-17 21:17:58 +00:00
Claude 42188b609b Fix combo points tracking for Vanilla WoW
The GetComboPoints() function was using TBC/WotLK syntax with two
parameters ("player", "target"), which is incorrect for Vanilla WoW 1.12.

In Vanilla WoW, GetComboPoints() takes no parameters and returns the
combo points on the current target.

This fixes the issue where macros were not tracking combo points correctly,
especially for users without pfui or other addon dependencies.

Fixes combo point tracking for Rupture, Rip, and Kidney Shot spells.
2025-11-17 20:41:34 +00:00
Torio 3bc2a224d4 Merge pull request #41 from jrc13245/claude/improve-combodurations-01GHh5y6dXtxNhoizDK8bSw3
Protect confirmed tracking from evaluation overwrites
2025-11-16 17:51:02 -05:00
Claude adb079dd1d Protect confirmed tracking from evaluation overwrites
Prevent TrackComboPointCast from overwriting confirmed tracking with
unconfirmed evaluation data. Once DoCast confirms a cast, subsequent
macro evaluations will no longer overwrite the tracking entry.

This fixes the issue where pfUI's second AddEffect call would see
unconfirmed tracking because evaluations overwrote the confirmed data.
2025-11-16 22:50:15 +00:00
Torio 456ee38cc8 Merge pull request #39 from jrc13245/claude/improve-combodurations-01GHh5y6dXtxNhoizDK8bSw3
CRITICAL: Add confirmation to DoCast hook
2025-11-16 17:40:25 -05:00
Claude b545f9bb3e CRITICAL: Add confirmation to DoCast hook
The issue: None of the CastSpellByName/CastSpell hooks were firing because
CleveRoid macros go through DoCast, not the standard casting functions.

Evidence from user output:
- Many "ComboTrack: Rip cast with 5 CP" messages ✓ (TrackComboPointCast called)
- NO "[Confirmed]" messages ✗ (no hooks firing)
- "[pfUI AddEffect Hook] Ignoring Rip tracking (not confirmed)" ✗ (never confirmed)

The DoCast integration was calling TrackComboPointCast but NOT setting
confirmed=true, so pfUI would always see unconfirmed tracking data.

Fix: Add confirmation in DoCast hook, just like all the other cast hooks.

Now when user casts via CleveRoid macros:
1. DoCast fires → TrackComboPointCast → confirmed=true ✓
2. pfUI AddEffect fires → sees confirmed=true → uses duration ✓
2025-11-16 22:39:17 +00:00
Torio e8cedffe97 Merge pull request #38 from jrc13245/claude/improve-combodurations-01GHh5y6dXtxNhoizDK8bSw3
Fix confirmation timing - confirm in cast hooks, not SPELLCAST_START
2025-11-16 17:36:00 -05:00
Claude f404496561 Fix confirmation timing - confirm in cast hooks, not SPELLCAST_START
CRITICAL FIX: For instant-cast spells, pfUI's AddEffect fires before
SPELLCAST_START, so confirmed flag was never set in time.

Event sequence for instant casts:
1. CastSpellByName hook → TrackComboPointCast (confirmed=false)
2. pfUI AddPending
3. SPELLCAST_STOP (instant cast completes)
4. pfUI PersistPending → AddEffect (confirmed still false!) ✗
5. SPELLCAST_START may not fire for instants

Solution: Confirm tracking immediately when cast functions are called:
- CastSpellByName_Hook → confirmed=true
- CastSpell_Hook → confirmed=true
- Hook global CastSpell → confirmed=true
- Hook global UseAction → confirmed=true
- SPELLCAST_START → confirmed=true (backup)

Now pfUI AddEffect (step 4) sees confirmed=true ✓

Added debug output showing:
"[Confirmed] Rip tracking confirmed (CastSpellByName)"

This ensures tracking is confirmed BEFORE pfUI tries to use it.
2025-11-16 22:34:33 +00:00
Torio 43d515fb11 Merge pull request #37 from jrc13245/claude/improve-combodurations-01GHh5y6dXtxNhoizDK8bSw3
Claude/improve combodurations 01 g hh5y6d xtx nhoiz dk8b sw3
2025-11-16 13:53:07 -05:00
Claude aedb2684b5 Add confirmation system to prevent pfUI from using evaluation-only tracking
Problem: Macro conditional evaluations create tracking entries, but
pfUI's AddEffect can fire during these evaluations (before actual cast),
causing it to use incorrect combo point data.

Flow before fix:
1. Macro evaluates [combo:>0] → TrackComboPointCast(0 CP, confirmed=false)
2. Macro evaluates again → TrackComboPointCast(1 CP, confirmed=false)
3. pfUI AddEffect fires → uses tracking (wrong timing!) ✗
4. SPELLCAST_START fires (actual cast)

Flow after fix:
1. Macro evaluates [combo:>0] → TrackComboPointCast(0 CP, confirmed=false)
2. Macro evaluates again → TrackComboPointCast(1 CP, confirmed=false)
3. SPELLCAST_START fires → sets confirmed=true ✓
4. pfUI AddEffect fires → only uses tracking if confirmed=true ✓

Changes:
- Added 'confirmed' field to tracking (default: false)
- SPELLCAST_START sets confirmed=true when spell actually casts
- pfUI AddEffect hook only uses tracking if confirmed=true
- Clear confirmed flag after use to prevent reuse
- Clear on failed/interrupted casts

Debug shows: "Ignoring X tracking (not confirmed - evaluation only)"
when preventing use of evaluation-only data.
2025-11-16 18:51:57 +00:00
Claude 7abb78c54e Fix combo point tracking - use name-based tracking as fallback
Prevent macro conditional evaluations from overwriting good CP data:

Problem: Macros like "[combo:>0 nodebuff]Rip /cast [combo:>0]Rip"
evaluate multiple times, calling TrackComboPointCast repeatedly:
1. Check [combo:>0 nodebuff] → TrackComboPointCast(0 CP)
2. Claw lands → player gains 1 CP
3. Check [combo:>0] → TrackComboPointCast(1 CP)
4. Spell casts → pfUI AddEffect fires → uses tracking data

If the 0 CP call happens after the 1 CP call, pfUI gets wrong data.

Solution: Only update tracking if:
- No existing data exists, OR
- Existing data is stale (>0.5s), OR
- New CP value >= existing CP value

This ensures we keep the highest (best) combo point count during
rapid macro evaluations, so pfUI always gets the correct duration.

Debug: Shows "Ignoring X with Y CP (have Z CP)" when preventing
overwrites of better data.
2025-11-16 18:49:12 +00:00
Jrc13245 83b3938d6d update real durations 2025-11-16 13:32:18 -05:00
Claude e7152e3683 Fix combo point tracking - use name-based tracking as fallback
The issue: UNIT_CASTEVENT fires AFTER combo points are consumed, so
GetComboPoints() returns 0. The lastComboPoints fallback wasn't always
set in time.

Solution: When TrackComboPointCastByID sees 0 combo points, it now:
1. First tries lastComboPoints (OnUpdate tracking)
2. If still 0, checks name-based tracking data from extension hooks
   (which captured the CP count BEFORE the spell was cast)
3. Uses the CP count if the cast was within the last 0.5 seconds

This ensures we always get the correct combo point count for duration
calculation, regardless of timing.
2025-11-16 18:04:20 +00:00
Claude 1172e3377b Add learned combo duration system - saves actual durations per CP
Major enhancement: System now learns actual combo finisher durations and
saves them per combo point level (1-5 CP).

**New SavedVariable:**
- CleveRoids_ComboDurations[spellID][comboPoints] = duration
- Persists between sessions
- Uses learned durations before calculated formulas

**ComboPointTracker.lua:**
- Added GetLearnedComboDuration(spellID, cp) - fetch learned duration
- Updated CalculateComboScaledDurationByID to check learned first
- Falls back to formula if not learned yet

**Utility.lua (libdebuff):**
- UNIT_CASTEVENT handler stores combo points in learnCastTimers
- RAW_COMBATLOG fade handler learns combo durations when spells expire
- Stores learned duration keyed by [spellID][comboPoints]
- Debug message shows "Learned combo spell X at Y CP = Zs"

**Core.lua:**
- New command: /cleveroid combolearn - Show all learned combo durations
- Lists each spell with all learned CP levels (1-5)
- Shows which durations have been learned vs not yet

**Benefits:**
- Debuff conditionals like [debuff:Rip<4] now use ACTUAL max duration
- Accounts for talents that modify finisher durations
- Learns different durations per rank
- More accurate than formulas for edge cases

**Example:**
After casting Rip with 5 CP and letting it expire, system learns:
CleveRoids_ComboDurations[1079][5] = 28
Future casts use 28s instead of calculated 12+4*4
2025-11-16 16:49:30 +00:00
Claude e07afa32d0 Fix combo point tracking - capture CPs before they're consumed
CRITICAL FIX: Combo points were showing as 0 because UNIT_CASTEVENT fires
AFTER the finisher consumes them.

Solution:
- Added CleveRoids.lastComboPoints to store the last known CP count
- UpdateComboPoints() continuously monitors and stores CP when > 0
- OnUpdate handler keeps lastComboPoints up-to-date every frame
- Also update on PLAYER_TARGET_CHANGED, UNIT_AURA, PLAYER_COMBO_POINTS
- TrackComboPointCastByID() uses stored value if current is 0
- Resets stored value after use to prevent reuse

Now correctly tracks: Rip at 5 CP = 28s, Rupture at 5 CP = 16s, etc.
2025-11-16 16:41:19 +00:00
Claude 3704ae0c23 Add debug output to diagnose ShowComboTracking loading issue
Added debug messages to confirm:
1. Whether ShowComboTracking is defined after being created
2. Whether it's successfully exported to global
3. Whether RegisterExtension exists when file loads

This will help identify why ShowComboTracking is nil at runtime.
2025-11-16 16:25:55 +00:00
Claude a14fe4ac74 Fix ShowComboTracking not being defined - restructure file loading
CRITICAL FIX: Moved all essential functions BEFORE Extension registration to
ensure they're always available even if Extension system fails.

Changes:
- Moved ShowComboTracking() definition to line 240 (before Extension)
- Moved slash command registration to before Extension
- Export CleveRoids to global BEFORE Extension.RegisterExtension()
- Added safety check: return early if RegisterExtension doesn't exist
- Removed duplicate function definitions at end of file
- Added helpful message when no combo data tracked yet

This ensures /cleveroid combotrack works even if Extension system fails.
2025-11-16 15:53:45 +00:00
Claude 4cf8e07a17 Improve combo point duration tracking system
Major enhancements to the combo point finisher tracking system:

**ComboPointTracker.lua:**
- Added spell ID-based tracking (ComboScalingSpellsByID table)
- All Rupture ranks (1943, 8639, 8640, 11273, 11274, 11275): 8s + 2s per CP
- Kidney Shot ranks (408, 8643): Rank 1: 1s + 1s per CP, Rank 2: 2s + 1s per CP
- Druid Rip ranks (1079, 9492, 9493, 9752, 9894, 9896): 12s + 4s per CP (corrected from 10s + 2s)
- New TrackComboPointCastByID() function for UNIT_CASTEVENT integration
- Initialize spell_tracking table to prevent nil errors
- Consistent debug output using CleveRoids.debug flag

**Utility.lua (libdebuff integration):**
- UNIT_CASTEVENT handler now checks combo scaling spells first
- Calls TrackComboPointCastByID() before normal duration lookup
- Learning system skips combo spells (they're dynamically calculated)
- Improved debug messages distinguish combo spells from regular spells

**Core.lua (console commands):**
- Added /cleveroid combotrack - Display recent combo finisher casts
- Added /cleveroid comboclear - Clear combo tracking data
- Updated help text with combo point tracking section

**README.md:**
- New "Combo Point Scaling" section with examples
- Updated settings documentation with new commands
- Added /cleveroid debug to settings list
- Example macros showing combo point-aware debuff conditionals

This system ensures accurate duration tracking for:
- Rogue: Rupture (8-16s), Kidney Shot (1-6s)
- Druid: Rip (12-28s)

All durations are now calculated based on actual combo points used at cast time.
2025-11-16 15:31:38 +00:00
Jrc13245 665b6c52e7 initial combo point duration checker 2025-11-10 17:35:33 -05:00