private void OnBidHouseItemRemoved(BidHouseItem item, BidHouseCategory category, bool categoryDeleted) { if (!Types.Contains((int)item.Template.TypeId)) { return; } if (!BidHouseManager.Instance.GetBidHouseCategories(item.Template.Id, MaxItemLevel).Any()) { CurrentViewedItem = 0; InventoryHandler.SendExchangeBidHouseGenericItemRemovedMessage(Character.Client, item); UpdateCurrentViewedItem(item.Template.Id); return; } if (CurrentViewedItem != item.Template.Id) { return; } if (categoryDeleted) { InventoryHandler.SendExchangeBidHouseInListRemovedMessage(Character.Client, category); } else { InventoryHandler.SendExchangeBidHouseInListUpdatedMessage(Character.Client, category); } }
public static void SendExchangeBidHouseInListUpdatedMessage(IPacketReceiver client, BidHouseCategory category) { client.Send(new ExchangeBidHouseInListUpdatedMessage(category.Id, category.TemplateId, category.Effects.Select(x => x.GetObjectEffect()), category.GetPrices())); }
public static void SendExchangeBidHouseInListRemovedMessage(IPacketReceiver client, BidHouseCategory category) { client.Send(new ExchangeBidHouseInListRemovedMessage(category.Id)); }