Previously, action button state functions (IsCurrentAction, IsActionInRange,
IsUsableAction, ActionHasRange, GetActionCount, IsConsumableAction) only
checked the active action, not the tooltip action. This caused issues when
using #showtooltip without conditionals, or when no conditionals matched:
- No glow on buttons even when the ability was queued/active
- Incorrect range/usability indicators
- Missing item counts for consumables
Now all these functions use the same priority as GetActionTexture and
GetActionCooldown: check the active action first, then fall back to the
tooltip action. This ensures button states match the displayed icon.
Fixes issues with abilities like Cleave and Heroic Strike not showing glow
when queued, and ensures all action button visuals are consistent.
When #showtooltip had an argument with conditionals (e.g., #showtooltip [stance:1] Fireball),
the code was trying to find a spell named "[stance:1] Fireball" which doesn't exist.
This resulted in no texture being found for the tooltip action, causing incorrect icons.
Now the code parses the argument first using GetParsedMsg() to extract just the spell name
before creating the tooltip action info. This allows it to properly find the spell in the
spellbook and retrieve its correct texture/icon.
Updated GetActionTexture to fall back to the macro's icon in all code paths:
- When no action is active and no explicit tooltip (line 2444)
- When inventory slot is empty (line 2469)
- Final fallback for all other cases (line 2494)
This ensures the macro icon is always shown instead of the question mark
when no action/spell texture is available. The question mark should only
appear as an absolute last resort if GetMacroInfo fails.
Updated fallback logic to always use the macro's chosen icon (from the
macro frame) when no action is active. The priority is now:
1. Tooltip texture (from first action if #showtooltip is present)
2. Macro's icon (from macro frame)
3. Never question mark (unless GetMacroInfo fails, which shouldn't happen)
This ensures the icon properly shows the macro's icon when all
conditionals fail, instead of showing a question mark.
When #showtooltip is used without an explicit spell/item argument and all
conditionals fail, the icon now falls back to the tooltip texture (first
action) instead of immediately showing a question mark. This prevents the
question mark icon from appearing when the macro has valid actions but none
of their conditions are currently met.
Fixes issue where macro icon becomes question mark when no target and
Battle Shout buff is already active.
BUGFIX: Core.lua:2253 attempt to compare nil with number
The cleanup loop was checking 'if time > cast.expires' but some entries
in spell_tracking (like combo tracking data) don't have an expires field.
Added nil check: 'if cast.expires and time > cast.expires'
This prevents errors when combo tracking data is in spell_tracking without
an expiration time.
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
When typing /cleveroid with no arguments, now displays:
1. Current settings (realtime, refresh, debug)
2. All available commands organized by category:
- Basic commands (realtime, refresh, learn, forget, debug)
- Immunity tracking commands
- Combo point tracking commands
Makes it easier for users to discover all available functionality.
The combotrack/comboclear commands were checking if functions existed at
file load time, but ComboPointTracker.lua loads after Core.lua, so the
checks always failed. Removed the checks since by runtime (when the user
executes the command) all files will be loaded and functions will exist.
Fixes "Combo point tracking not available" message.
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.