fix(inventory): an opened package reports success in UseItemResult, as live

Item::UseNonEquip declared a second `success` inside the package branch, so
the UseItemResult it sent (and its log line) was always false, even when the
package opened and its contents were given. The client
(LWOInventoryComponent_Client::sub_00c1bb20 (0x00c1bb20)) plays the item's
audioEventUse on true and a failure sound on false; live sent true for 183
of the 187 UseItemResult in the captures.

Test: UseItemResultTests.AnOpenedPackageReportsSuccess.

Check in game: opening a package (e.g. a starter pack or a reward bag) plays
its open sound rather than the failure sound.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-10-02 09:46:38 -05:00
parent 2982a7f23c
commit 4fbebf7135
3 changed files with 69 additions and 1 deletions

View File

@@ -22,6 +22,7 @@ set(DCOMPONENTS_TESTS
"ReplicaDecoderTests.cpp"
"CapturePropertyTests.cpp"
"ItemRemovalTests.cpp"
"UseItemResultTests.cpp"
"LootMetricsTests.cpp"
"SpawnerComponentTests.cpp"
)