mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-04 16:10:08 +00:00
Misc
This commit is contained in:
@@ -241,6 +241,12 @@ namespace ArchiSteamFarm {
|
||||
return (false, string.Format(Strings.ErrorObjectIsNull, nameof(appID) + " || " + nameof(contextID)));
|
||||
}
|
||||
|
||||
if ((wantedRealAppIDs?.Count == 0) || (unwantedRealAppIDs?.Count == 0) || (wantedTypes?.Count == 0)) {
|
||||
Bot.ArchiLogger.LogNullError(nameof(wantedRealAppIDs) + " || " + nameof(unwantedRealAppIDs) + " || " + nameof(wantedTypes));
|
||||
|
||||
return (false, string.Format(Strings.ErrorObjectIsNull, nameof(wantedRealAppIDs) + " || " + nameof(unwantedRealAppIDs) + " || " + nameof(wantedTypes)));
|
||||
}
|
||||
|
||||
if (!Bot.IsConnectedAndLoggedOn) {
|
||||
return (false, Strings.BotNotConnected);
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -189,7 +189,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
// If we're not farming, and we got new items, it's likely to be a booster pack or likewise
|
||||
// In this case, perform a loot if user wants to do so
|
||||
if (Bot.BotConfig.SendOnFarmingFinished) {
|
||||
if (Bot.BotConfig.SendOnFarmingFinished && (Bot.BotConfig.LootableTypes.Count > 0)) {
|
||||
await Bot.Actions.SendTradeOffer(wantedTypes: Bot.BotConfig.LootableTypes).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -358,7 +358,7 @@ namespace ArchiSteamFarm {
|
||||
lootableTypesReceived = await ParseActiveTrades().ConfigureAwait(false);
|
||||
}
|
||||
|
||||
if (lootableTypesReceived && Bot.BotConfig.SendOnFarmingFinished) {
|
||||
if (lootableTypesReceived && Bot.BotConfig.SendOnFarmingFinished && (Bot.BotConfig.LootableTypes.Count > 0)) {
|
||||
await Bot.Actions.SendTradeOffer(wantedTypes: Bot.BotConfig.LootableTypes).ConfigureAwait(false);
|
||||
}
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user