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

@ -561,9 +561,12 @@ DetermineUseResult(object): // 0x00588460
return 0
```
The first capacity bit expression is corrupted into a string address by Binary
Ninja. Capacity fields and `IsComponentPack` make the branch intent clear, but the
missing bit name/value is **unresolved** and must be recovered before porting.
The first capacity bit expression was corrupted into a string address by Binary
Ninja. Matching-executable disassembly at `0x005884B6` resolves it exactly as
`test PWD._bitfield, 0x00800000`, i.e. `BF_REQUIRES_PACKSLOT`. The complete
result-2 predicate is therefore `(!BF_REQUIRES_PACKSLOT && itemsCapacity == 0 &&
containersCapacity == 0) || IsComponentPack()` after the loose/viewed-container
and wielder gates. This was pinned on 2026-07-11 before the Core policy port.
`CPlayerSystem::UsingItem` first executes result `2..8`, then independently:
@ -772,10 +775,10 @@ The return value means neither strictly "a server message was sent" nor strictly
"the item moved": vendor and secure-trade attempts deliberately return false.
Callers that use it only as an action-success boolean will diverge.
**Semantic name uncertain:** the vendor-drop test appears in pseudo-C as a raw
bitfield byte test. The branch behavior is exact, but its PWD flag name must be
recovered before making a reusable Core policy field; do not substitute a check
against `ClientUISystem.vendorID` without that evidence.
The vendor-drop test is now pinned. Matching-executable disassembly at
`0x0058874C` loads `PWD._bitfield` and `test ah, 0x02`, i.e. overall mask
`0x00000200 = BF_VENDOR`. It is an object-trait test, distinct from
`ClientUISystem.vendorID`.
---