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

@ -1042,7 +1042,7 @@ namespace Server.Mobiles
var info = GetSellInfo();
var list = new List<SellItemState>();
var set = new HashSet<SellItemState>(new SellItemStateComparer());
foreach (var ssi in info)
{
@ -1055,16 +1055,16 @@ namespace Server.Mobiles
if (item.IsStandardLoot() && item.Movable && ssi.IsSellable(item))
{
list.Add(new SellItemState(item, ssi.GetSellPriceFor(item), ssi.GetNameFor(item)));
set.Add(new SellItemState(item, ssi.GetSellPriceFor(item), ssi.GetNameFor(item)));
}
}
}
if (list.Count > 0)
if (set.Count > 0)
{
SendPacksTo(from);
from.NetState.SendVendorSellList(Serial, list);
from.NetState.SendVendorSellList(Serial, set);
}
else
{