Range Color Skills

RangeColorSkills highlights action buttons with custom colors: red when out of range, blue for low mana, yellow for both. Fully customizable in settings. Works in Retail, Classic+, and Cata. Use /rcs to configure.

File Details

RangeColorSkills_05-02-26.zip

  • R
  • Feb 5, 2026
  • 8.12 KB
  • 805
  • 12.0.1+4
  • Retail + 3

File Name

RangeColorSkills_05-02-26.zip

Supported Versions

  • 12.0.1
  • 12.0.0
  • 5.5.3
  • 2.5.5
  • 1.15.8

Major Changes

Split codebase for better compatibility

Retail (12.0.0+) Support

Added full support for WoW Retail 12.0.0

Optimizations

  • Removed redundant ActionButton_OnUpdate hook (Retail uses different model)
  • Fixed double-call issues with UpdateButtonColor
  • Initialized buttonData on-demand to prevent early update failures

Classic / TBC Anniversary Support

Maintained backward compatibility

  • Uses ActionButton_OnUpdate hook (as original code)
  • Calls both UpdateButtonRange and UpdateButtonColor in OnUpdate cycle
  • Supports all action bar types: ActionButton, MultiBar*, BonusActionButton, PetActionButton
  • Added SetScript("OnUpdate") initialization for all buttons with timer-based updates

Fixed Classic-specific issues

  • Added SetColorTexture fallback to SetTexture for older clients
  • Fixed checkbox text reference (checkbox.Text vs _G[name.."Text"])
  • Removed Retail-only ActionButton_UpdateUsable hook from Classic path
  • Added C_Timer.After fallback for versions without C_Timer API
  • Used pcall wrapper for IsUsableAction for error safety

Settings Panel Improvements

Universal compatibility

  • Retail: Uses Settings.RegisterCanvasLayoutCategory (10.0+ API)
  • Classic: Uses InterfaceOptions_AddCategory (legacy API)
  • Slash command /rcs works in all versions with appropriate fallbacks
  • Added Reset button functionality in Classic version

Code Quality

Improved error handling

  • Added nil checks for self.actiondb, icon, and normal textures
  • Safe color table validation before SetVertexColor
  • Fixed variable shadowing (type → actionType)
  • Removed recursive call issues in UpdateButtonRange

Technical Details

Architecture changes

  • Retail: Event-driven model (hooks + OnUpdate for 120 ActionButtons)
  • Classic: Polling model (OnUpdate for all action bar buttons)
  • No double-update issues (separated range check from color update triggers)
  • Proper buttonData initialization to avoid race conditions

Supported versions

  • ✅ Retail 12.0.0+
  • ✅ TBC Anniversary (2.5.5+)
  • ✅ Classic Anniversary (1.15.8+)
  • ✅ Classic Pandaria (5.5.3+)