Esempio n. 1
0
        public void TransferInventoryItem(int sourceInventoryId, int destinationInventoryId, int itemId)
        {
            var sourceInventory      = TerminalScreen.LeftInventories()[sourceInventoryId];
            var rightInventory       = TerminalScreen.RightInventories();
            var destinationInventory = rightInventory[destinationInventoryId];

            MyInventory.TransferByUser(sourceInventory, destinationInventory, (uint)itemId,
                                       destinationInventory.ItemCount);
            TerminalInventoryController().CallMethod <object>("RefreshSelectedInventoryItem", new object[] { });
        }
Esempio n. 2
0
        public override TerminalInventoryData Data()
        {
            var controller       = TerminalInventoryController();
            var inventories      = controller.CallMethod <MyInventory[]>("GetSourceInventories");
            var rightInventories = TerminalScreen.RightInventories();

            return(new TerminalInventoryData()
            {
                LeftInventories = inventories.Select(i => i.ToInventory()).ToList(),
                RightInventories = rightInventories.Select(i => i.ToInventory()).ToList(),
            });
        }