fix: Fixes client crash while selling items to NPC (#1296)

This commit is contained in:
Kamron Batman 2022-12-05 20:16:31 -08:00 • committed by GitHub
parent f82f61b4c5
commit bfb987c758
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 12 deletions

View file

@ -51,6 +51,14 @@ public class SellItemResponse
public int Amount { get; }
}
public class SellItemStateComparer : IEqualityComparer<SellItemState>
{
public bool Equals(SellItemState l, SellItemState r) =>
l == null && r == null || l != null && r != null && l.Item == r.Item;
public int GetHashCode(SellItemState obj) => obj.Item.GetHashCode();
}
public class SellItemState
{
public SellItemState(Item item, int price, string name)