Beispiel #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)));
            }
Beispiel #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)));
            }
Beispiel #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");
     }
 }
Beispiel #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.");
            }
        }