diff --git a/BotLooter/Looting/LootClient.cs b/BotLooter/Looting/LootClient.cs index 32e9d16..3752c38 100644 --- a/BotLooter/Looting/LootClient.cs +++ b/BotLooter/Looting/LootClient.cs @@ -213,7 +213,7 @@ public async Task TryLoot(TradeOfferUrl tradeOfferUrl, Configuration } assets = assets - .Take(Math.Min(configuration.MaxItemsPerTrade, 8192)) + .Take(configuration.MaxItemsPerTrade) .ToList(); return (assets, ""); diff --git a/BotLooter/Resources/Configuration.cs b/BotLooter/Resources/Configuration.cs index 32b785a..c309aa3 100644 --- a/BotLooter/Resources/Configuration.cs +++ b/BotLooter/Resources/Configuration.cs @@ -95,6 +95,11 @@ В параметре конфига 'Inventories' не указаны инве ... """); } + + if (config.MaxItemsPerTrade < 8192) + { + return (null, $"Параметр конфига 'MaxItemsPerTrade' не должен быть меньше 8192, текущее значение: {config.MaxItemsPerTrade}"); + } return (config, ""); }