This commit is contained in:
JustArchi
2020-01-01 12:45:32 +01:00
parent 67f29ed765
commit f0292a07b9
4 changed files with 10 additions and 4 deletions

View File

@@ -1018,7 +1018,7 @@ namespace ArchiSteamFarm {
internal async Task OnFarmingFinished(bool farmedSomething) {
await OnFarmingStopped().ConfigureAwait(false);
if (BotConfig.SendOnFarmingFinished && (farmedSomething || !FirstTradeSent)) {
if (BotConfig.SendOnFarmingFinished && (BotConfig.LootableTypes.Count > 0) && (farmedSomething || !FirstTradeSent)) {
FirstTradeSent = true;
await Actions.SendTradeOffer(wantedTypes: BotConfig.LootableTypes).ConfigureAwait(false);
@@ -1800,7 +1800,7 @@ namespace ArchiSteamFarm {
SendItemsTimer = null;
}
if ((BotConfig.SendTradePeriod > 0) && BotConfig.SteamUserPermissions.Values.Any(permission => permission >= BotConfig.EPermission.Master)) {
if ((BotConfig.SendTradePeriod > 0) && (BotConfig.LootableTypes.Count > 0) && BotConfig.SteamUserPermissions.Values.Any(permission => permission >= BotConfig.EPermission.Master)) {
SendItemsTimer = new Timer(
async e => await Actions.SendTradeOffer(wantedTypes: BotConfig.LootableTypes).ConfigureAwait(false),
null,