Esempio n. 1
0
        private void ApplyChangeItemInventoryCommand(MarketItemModel model, MarketMoveItemType marketMoveType)
        {
            FormModel.AddItemLock(model);
            FormModel.SetChanges();
            var apiCommand = Strategy.GetChangeItemInventoryCommand(model, marketMoveType);

            apiCommand.CommandFinished += OnChangeInventoryItemFinished;
            SendApiCommand(apiCommand, false);
        }
        private ItemActionType CovertMarketAction(MarketMoveItemType transactionType)
        {
            switch (transactionType)
            {
            case MarketMoveItemType.FromMarket:
                return(ItemActionType.FromMarket);

            case MarketMoveItemType.ToMarket:
                return(ItemActionType.ToMarket);

            default:
                throw new NotImplementedException("Cannot convert " + transactionType);
            }
        }
Esempio n. 3
0
 public ChangeInventoryForItemCommand(MarketItemModel itemModel, MarketMoveItemType marketMoveType) : base(itemModel)
 {
     _request = new MarketMoveItemRequestParams
     {
         AssetIds = new List <string>()
         {
             TargetItemModel.AssetId
         },
         ClassIds = new List <string>()
         {
             TargetItemModel.ClassId
         },
         TransactionType = marketMoveType,
         Callback        = OnGameResponse
     };
 }
Esempio n. 4
0
 ApiCommandBase IMarketStrategy.GetChangeItemInventoryCommand(MarketItemModel model, MarketMoveItemType marketMoveType)
 {
     return(new ChangeInventoryForItemCommand(model, marketMoveType));
 }
Esempio n. 5
0
 ApiCommandBase IMarketStrategy.GetChangeItemInventoryCommand(MarketItemModel model, MarketMoveItemType marketMoveType)
 {
     return(new MockupItemOperationCommand(model));
 }