Skip to content

Add interrupt cast-bar feedback for target and focus unit frames#352

Open
liamcooper wants to merge 1 commit into
EllesmereGaming:mainfrom
liamcooper:feat/unit-frame-cast-kick-indicators
Open

Add interrupt cast-bar feedback for target and focus unit frames#352
liamcooper wants to merge 1 commit into
EllesmereGaming:mainfrom
liamcooper:feat/unit-frame-cast-kick-indicators

Conversation

@liamcooper
Copy link
Copy Markdown
Contributor

Summary

Target and focus unit frame cast bars now use the same interrupt feedback as nameplates: dual fill colors based on whether your kick is ready, a grey overlay for uninterruptible casts, and an optional tick showing where the cast will be when your interrupt comes off cooldown.

Kick spell detection and cast-bar tinting are centralized in core EllesmereUI so nameplates and unit frames share one implementation.

Shared changes (EllesmereUI_Kick.lua)

New core module loaded from EllesmereUI.toc:

  • kickSpellsByClass — per-class interrupt spell IDs (single source of truth)
  • EllesmereUI.GetActiveKickSpell() — resolves the player’s current kick from the spell book
  • EllesmereUI.RefreshKickAbility() — refreshes on PLAYER_LOGIN, SPELLS_CHANGED, and reload
  • EllesmereUI.ComputeCastBarTint(readyTint, baseTint) — blends interruptible vs on-CD colors using secret-safe APIs (C_Spell.GetSpellCooldownDuration, C_CurveUtil.EvaluateColorValueFromBoolean)

Nameplates no longer duplicate this logic. ns.GetActiveKickSpell and ns.ComputeCastBarTint forward to EllesmereUI, so the cast overlay and on-plate bars behave as before with less code to maintain.

Unit frames

Applies to target and focus only (not player or boss):

  • Interruptible castcastbarFillColor (shown when the cast can be interrupted and your kick is off cooldown)
  • Interrupt on CDcastbarInterruptReadyColor (shown while your interrupt is on cooldown)
  • Uninterruptible overlay — existing grey shield tint, driven via SetAlphaFromBoolean on notInterruptible
  • Kick-ready tick — optional (castbarKickTickEnabled, default on); hidden when the cast is not interruptible or kick is ready

Cast-active tracking registers SPELL_UPDATE_COOLDOWN only while target/focus are casting, matching the nameplate pattern.

Options

On target/focus cast bar settings:

  • Two color swatches inline on Show Cast Bar (same tooltips as nameplates: “Interruptible Cast”, “Interrupt on CD”)
  • Show Tick at Kick Ready Spot on the row below Show Icon
  • Hide When Idle in the left column of its own row (not full width)
  • Sync icons to copy cast colors and kick-tick setting between target and focus

Test plan

  • /reload on a class with an interrupt (e.g. Demon Hunter)
  • Target an enemy casting an interruptible spell: cast bar uses interruptible color when kick is ready, on-CD color when kick is on cooldown
  • Confirm kick-ready tick appears only when kick is on CD and cast is interruptible
  • Target an uninterruptible cast: grey shield overlay, no tick
  • Repeat on focus frame
  • Change both swatches in options; confirm target/focus update and sync between them
  • Nameplates: confirm cast bar colors and kick tick still work (shared kick module)
  • Spec/talent change or /reload: kick spell still resolves correctly

Share kick spell lookup and cast tint logic in EllesmereUI_Kick so nameplates
and unit frames stay in sync. Target and focus cast bars now match nameplate
interrupt colors and the kick-ready tick.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant