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); } }
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 }; }
ApiCommandBase IMarketStrategy.GetChangeItemInventoryCommand(MarketItemModel model, MarketMoveItemType marketMoveType) { return(new ChangeInventoryForItemCommand(model, marketMoveType)); }
ApiCommandBase IMarketStrategy.GetChangeItemInventoryCommand(MarketItemModel model, MarketMoveItemType marketMoveType) { return(new MockupItemOperationCommand(model)); }