Exemplo n.º 1
0
            public bool AddMyItem(int appId, long contextId, long assetId, long amount = 1)
            {
                var asset = new TradeStatusUser.TradeAsset();

                asset.CreateItemAsset(appId, contextId, assetId, amount);
                return(ShouldUpdate(MyOfferedItems.AddItem(asset)));
            }
Exemplo n.º 2
0
            public bool RemoveMyCurrencyItem(int appId, long contextId, long currencyId, long amount)
            {
                var asset = new TradeStatusUser.TradeAsset();

                asset.CreateCurrencyAsset(appId, contextId, currencyId, amount);
                return(ShouldUpdate(MyOfferedItems.RemoveCurrencyItem(asset)));
            }
Exemplo n.º 3
0
 private void ValidateLocalTradeItems()
 {
     if (!myOfferedItemsLocalCopy.Values.OrderBy(o => o).SequenceEqual(MyOfferedItems.OrderBy(o => o)))
     {
         throw new TradeException("Error validating local copy of offered items in the trade");
     }
 }
Exemplo n.º 4
0
        private void ValidateLocalTradeItems()
        {
            if (steamMyOfferedItems.Count != MyOfferedItems.Count)
            {
                throw new TradeException("Error validating local copy of items in the trade: Count mismatch");
            }

            if (steamMyOfferedItems.Values.Any(id => !MyOfferedItems.Contains(id)))
            {
                throw new TradeException("Error validating local copy of items in the trade: Item was not in the Steam Copy.");
            }
        }