fix(combat): synchronize auto-target presentation

Make the retained toolbar consume retail's payload-free selection notice from canonical live state so a reentrant Auto Target replacement cannot be erased by the outer clear. Restrict automatic acquisition to the requested hostile non-player monster policy and record the intentional PK edge divergence.

Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-12 20:26:00 +02:00
parent 8be933fc94
commit 0f2d98c501
11 changed files with 225 additions and 7 deletions

View file

@ -132,6 +132,14 @@ presentation, target indicator, use/pickup, PreviousSelection, and plugins all
read or write this same owner. Plugins use `IPluginHost.Selection`; plugin event
failures are isolated from the client and other plugins.
Retail `CM_UI::SendNotice_SelectionChanged @ 0x00479F50` carries no object-id
payload. Notice consumers such as `gmToolbarUI::HandleSelectionChanged` read the
current global selection when invoked. Preserve that rule in retained UI: a
handler registered earlier can retarget reentrantly (Auto Target on a death
clear), so applying the captured outer transition afterward produces stale UI
even though `SelectionState` is correct. Selected-object presentation must read
`SelectionState.SelectedObjectId` at notification time. Issue #205, 2026-07-12.
`AcDream.App.UI.InteractionState` separately owns temporary pointer orchestration:
`None`, `Use`, `Examine`, or `UseItemOnTarget(sourceGuid)`. Item target mode is a
projection of this state, not a second selected-object field. Keep selection in