ArchipelagoMW / Archipelago.MultiClient.Net

A client library for use with .NET based prog-langs for interfacing with Archipelago hosts.
MIT License
14 stars 11 forks source link

Duplicates of the exact same item causes ItemHelper desyncs #46

Closed dewiniaid closed 2 years ago

dewiniaid commented 2 years ago

I think I've tracked this down to a library issue.

When receiving exact copies of the same item from the exact same location, the produced NetItems compare identical. This causes ReceivedItemHelper:Socket_PacketReceived to skip the duplicate items -- preventing it from being added to the itemQueue, among other things.

The first time this happens, the client is never notified of the new item. The second time it happens, a resync triggers (since Multiclient realizes it only has N items in its list when it should have N+1) and from the caller'sperspective it receives two new items: the first two items ever sent. This behavior is witnessed with https://github.com/Ijwu/Archipelago.HollowKnight/issues/79.

This currently can only happen with /send, !getitem, and startinventory -- all of which can have multiple instances of the same item ID, sender, recipient, and location.

Jarno458 commented 2 years ago

Intresting, that is indeed a scenario that was not foreseen, the idea was always that each location only had 1 item

This requires some looking into, I will however have no time the upcoming week