public GuiDialogCreateAuction(ICoreClientAPI capi, EntityAgent owningEntity, InventoryGeneric auctionSlotInv) : base(capi) { this.owningEntity = owningEntity; this.auctionSlotInv = auctionSlotInv; auctionSys = capi.ModLoader.GetModSystem <ModSystemAuction>(); Init(); }
public GuiDialogConfirmPurchase(ICoreClientAPI capi, EntityAgent buyerEntity, EntityAgent auctioneerEntity, Auction auction) : base(capi) { this.buyerEntity = buyerEntity; this.traderEntity = auctioneerEntity; this.auction = auction; auctionSys = capi.ModLoader.GetModSystem <ModSystemAuction>(); Init(); }
public GuiDialogTrader(InventoryTrader traderInventory, EntityAgent owningEntity, ICoreClientAPI capi, int rows = 4, int cols = 4) : base(capi) { auctionSys = capi.ModLoader.GetModSystem <ModSystemAuction>(); auctionSys.OnCellUpdateClient = () => { listElem?.ReloadCells(auctions); updateScrollbarBounds(); }; auctionSys.curTraderClient = owningEntity as EntityTrader; this.traderInventory = traderInventory; this.owningEntity = owningEntity; this.rows = rows; this.cols = cols; if (!auctionSys.createAuctionSlotByPlayer.TryGetValue(capi.World.Player.PlayerUID, out auctionSlotInv)) { auctionSys.createAuctionSlotByPlayer[capi.World.Player.PlayerUID] = auctionSlotInv = new InventoryGeneric(1, "auctionslot-" + capi.World.Player.PlayerUID, capi); } capi.Network.SendPacketClient(auctionSlotInv.Open(capi.World.Player)); Compose(); }