feat(ui): port retail item interaction policy

This commit is contained in:
Erik 2026-07-11 01:23:31 +02:00
parent 0cf780478a
commit a8da4fd05a
20 changed files with 1110 additions and 104 deletions

View file

@ -140,3 +140,21 @@ Core and interaction modes in App when completing Wave 3.
The 2026-07-11 Release gate passed for world/radar/inventory/paperdoll selection
synchronization, toolbar/target/radar presentation, PreviousSelection, and the
movement/door/armor/window regression tour.
## 2026-07-11 item-interaction policy boundary
`AcDream.Core.Items.ItemInteractionPolicy` owns the pure, ordered retail rules
from `DetermineUseResult`, `UseObject`, target compatibility, and
`AttemptPlaceIn3D`. Do not put vendor/trade/confirmation/stack/ground legality
back into widgets or `GameWindow`. `ItemInteractionController` snapshots mutable
objects, applies the 200 ms pre-legality throttle, balances busy state against
Core.Net `UseDone`, manages target mode, and dispatches typed actions. PWD flags
and `CombatUse` are retained from CreateObject; `IsComponentPack` is resolved
against portal.dat's `SpellComponentTable`.
Matching-executable x86 pins the two operands lost by Binary Ninja:
`DetermineUseResult @ 0x005884B6` tests `BF_REQUIRES_PACKSLOT (0x00800000)`, and
`AttemptPlaceIn3D @ 0x00588752` tests `BF_VENDOR (0x00000200)`. Preserve the
retail asymmetry that `UseObject` early-classifies results 2..7 but excludes 8,
and preserve placement's action list separately from its boolean return (vendor
sale and secure-trade attempts act while returning false).