Skip to content

feat(click casting): optionally target the unit you click-cast on#116

Closed
Krathe82 wants to merge 1 commit into
DanderBot:mainfrom
Krathe82:feat/clickcast-target-on-cast
Closed

feat(click casting): optionally target the unit you click-cast on#116
Krathe82 wants to merge 1 commit into
DanderBot:mainfrom
Krathe82:feat/clickcast-target-on-cast

Conversation

@Krathe82
Copy link
Copy Markdown
Contributor

Summary

Adds a "target on cast" behaviour so click-casting a spell on a frame can also set that unit as your target (lab features #410, #15).

  • Global toggle "Target unit when click-casting" in the Click Casting profiles panel (off by default).
  • Per-binding override under Advanced → Macro Options. Three-way: inherit (default) / On / Off — an explicit override wins over the global, while leaving it untouched keeps following the global toggle.
  • Implemented by appending /target [@mouseover,exists] mouseover to the generated cast macro. The mouseover gate means a frame click targets that unit, while a target-fallback cast (nothing hovered) leaves your current target alone. Works in combat (secure macro).
  • Covers the single and combined (friendly+hostile) macro paths; the combined path targets if any contributing binding opts in.
  • Applies to spell/item casts only; custom macros and the target/focus/menu/assist special actions are untouched.

Test plan

  • Global toggle on → click-cast a heal on a frame targets that unit; mouseover-cast (no frame) leaves target unchanged.
  • Per-binding On with global off → only that binding targets.
  • Per-binding Off with global on → that binding doesn't target.
  • Untouched per-binding follows the global toggle after changing it.
  • Works in combat; no Lua errors; custom-macro and special-action binds unaffected.

Adds a "target on cast" behaviour so click-casting a spell on a frame can
also set that unit as your target.

- Global toggle "Target unit when click-casting" in the Click Casting
  profiles panel (off by default).
- Per-binding override (Advanced -> Macro Options) that wins over the
  global; nil inherits the global, so existing binds follow the toggle.
- Implemented by appending "/target [@mouseOver,exists] mouseover" to the
  generated cast macro. The mouseover gate means a frame click targets that
  unit while a target-fallback cast leaves your current target alone. Works
  in combat (secure macro). Covers the single and combined (friendly+hostile)
  macro paths; the combined path targets if any contributing binding opts in.
- Applies to spell/item casts only; custom macros and the target/focus/
  menu/assist special actions are untouched.
DanderBot added a commit that referenced this pull request May 29, 2026
@Krathe82 Krathe82 closed this Jun 4, 2026
@Krathe82 Krathe82 deleted the feat/clickcast-target-on-cast branch June 4, 2026 12:36
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