Skip to content

Add opt-in Party Target frames to party frames - #1510

Open
apainter2 wants to merge 4 commits into
EllesmereGaming:mainfrom
apainter2:feature/party-target-frames
Open

Add opt-in Party Target frames to party frames#1510
apainter2 wants to merge 4 commits into
EllesmereGaming:mainfrom
apainter2:feature/party-target-frames

Conversation

@apainter2

@apainter2 apainter2 commented Aug 16, 2026

Copy link
Copy Markdown

Adds a minimal, opt-in Party Target feature: a small clickable secure frame next to each party member showing that member's current target (party1target..party4target). Left-click targets the unit via secure attributes so it works in combat with no taint.

The feature is Party-only and defaults OFF. It builds lazily on first enable (no frames, events, or work while disabled), is event-driven (UNIT_TARGET/UNIT_NAME_UPDATE/GROUP_ROSTER_UPDATE) with no OnUpdate or polling, and uses RegisterUnitWatch for visibility. Raid frames are untouched.

What does this PR do?

Adds a minimal, opt-in Party Target feature: a small clickable frame next to each party member showing that member's current target (party1target..party4target). Left-click targets/selects that unit. Similar to a feather offered by Shadow Unit Frames and ElvUI.

It is a native extension of the existing party frame architecture in EllesmereUIRaidFrames.lua (the module that owns both party and raid frames). The feature is Party-only and defaults OFF.

  • Zero cost while disabled: nothing is created or registered until enabled. OnEnable calls PT_SetEnabled(db.profile.partyShowTargets) (default false), which returns immediately when off.
  • Lazy build on first enable: creates 5 secure child frames once, then registers events and unit watches.
  • Taint-free secure click: each frame is a SecureUnitButton with useparent-unit=true + unitsuffix="target" + *type1="target", so the unit is resolved by Blizzard's secure handler at click time and works in combat with no protected mutation. Enable/disable is deferred out of combat.
  • Cheap when enabled: event-driven (UNIT_TARGET filtered to owner units, UNIT_NAME_UPDATE, GROUP_ROSTER_UPDATE, PLAYER_ENTERING_WORLD); no OnUpdate, no timers, no per-frame allocations. Visibility owned by RegisterUnitWatch (no polling).
  • Raid frames untouched: target frames attach only to party header buttons; no raidNtarget frames, no changes to raid creation/sorting/layout/events.

Configuration: Options -> Raid Frames -> Party tab -> FRAMES -> "Enable Party Targets".

Files changed:

  • EllesmereUIRaidFrames/EllesmereUIRaidFrames.lua
  • EllesmereUIOptions/EUI_RaidFrames_Options.lua

How was it tested?

Live retail client. Verified: feature off = no frames/events; enabling shows target frames next to party members; name appears/updates on target change; left-click selects the unit (in and out of combat); frame hides when the member clears their target; disabling hides frames and stops work. Raid frames verified unchanged. No Lua errors.

Screenshots

Before:
WoWScrnShot_081626_171706

After:
WoWScrnShot_081626_171716

Checklist

  • New settings default OFF (no behavior change without opt-in)
  • Zero cost while disabled: no events registered, no polling, no hooks doing work, no frames built
  • Cheap while enabled: event-driven (no polling, no timer-based logic, no per-frame allocations)
  • No writes onto Blizzard-owned frames; HookScript/hooksecurefunc only, never SetScript on Blizzard frames
  • Tested in-game on live; no version gates or pre-Midnight APIs added

@EllesmereGaming

Copy link
Copy Markdown
Owner

hey! thanks this looks promising. can i get a picture of the options? i think the targets should be much smaller relative to the actual party frames, similar to target unit frame vs target of target unit frame.

@apainter2

Copy link
Copy Markdown
Author

hey! thanks this looks promising. can i get a picture of the options? i think the targets should be much smaller relative to the actual party frames, similar to target unit frame vs target of target unit frame.

image

@apainter2

Copy link
Copy Markdown
Author

Change to party target frame size as suggested by @EllesmereGaming.

image

@apainter2

Copy link
Copy Markdown
Author

Updated PR and my changes to match the 8.9.3 codebase.

@EllesmereGaming

Copy link
Copy Markdown
Owner

we do have a feature halt currently but I am looking at potentially bringing this in next patch!

@apainter2

Copy link
Copy Markdown
Author

we do have a feature halt currently but I am looking at potentially bringing this in next patch!

Hi there, I was wondering if this is still in the plans to be brought into the main release or to remain in a holding pattern?

@apainter2 apainter2 left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed changes with several versions of EllemereUI code and no issues.

apainter2 and others added 2 commits August 31, 2026 15:57
Adds a minimal, opt-in Party Target feature: a small clickable secure
frame next to each party member showing that member's current target
(party1target..party4target). Left-click targets the unit via secure
attributes so it works in combat with no taint.

The feature is Party-only and defaults OFF. It builds lazily on first
enable (no frames, events, or work while disabled), is event-driven
(UNIT_TARGET/UNIT_NAME_UPDATE/GROUP_ROSTER_UPDATE) with no OnUpdate or
polling, and uses RegisterUnitWatch for visibility. Raid frames are
untouched.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Scale party target frames to ~0.56x width / ~0.55x height of their owner
party button, mirroring EllesmereUI's Target vs Target-of-Target size
convention so the party -> party-target pairing reads clearly. Sizing is
applied in the existing out-of-combat _PT_Layout pass; no raid frame code
paths are touched.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@apainter2
apainter2 force-pushed the feature/party-target-frames branch from b272afb to c729cad Compare August 31, 2026 14:58
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.

2 participants