mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-10 05:34:25 +00:00
Goodbye Steam Sale
Keeping core around for eventual next one
This commit is contained in:
@@ -127,6 +127,7 @@ namespace ArchiSteamFarm {
|
||||
return htmlDocument?.DocumentNode.SelectSingleNode("//div[@class='add_free_content_success_area']") != null;
|
||||
}
|
||||
|
||||
/*
|
||||
internal async Task<bool> ClearFromDiscoveryQueue(uint appID) {
|
||||
if (appID == 0) {
|
||||
Bot.ArchiLogger.LogNullError(nameof(appID));
|
||||
@@ -151,6 +152,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
return await WebBrowser.UrlPostRetry(request, data).ConfigureAwait(false);
|
||||
}
|
||||
*/
|
||||
|
||||
internal void DeclineTradeOffer(ulong tradeID) {
|
||||
if ((tradeID == 0) || string.IsNullOrEmpty(Bot.BotConfig.SteamApiKey)) {
|
||||
@@ -180,6 +182,7 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
internal async Task<HashSet<uint>> GenerateNewDiscoveryQueue() {
|
||||
if (!await RefreshSessionIfNeeded().ConfigureAwait(false)) {
|
||||
return null;
|
||||
@@ -200,6 +203,7 @@ namespace ArchiSteamFarm {
|
||||
Steam.NewDiscoveryQueueResponse output = await WebBrowser.UrlPostToJsonResultRetry<Steam.NewDiscoveryQueueResponse>(request, data).ConfigureAwait(false);
|
||||
return output?.Queue;
|
||||
}
|
||||
*/
|
||||
|
||||
internal HashSet<Steam.TradeOffer> GetActiveTradeOffers() {
|
||||
if (string.IsNullOrEmpty(Bot.BotConfig.SteamApiKey)) {
|
||||
@@ -360,6 +364,7 @@ namespace ArchiSteamFarm {
|
||||
return await WebBrowser.UrlGetToHtmlDocumentRetry(request).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/*
|
||||
internal async Task<HtmlDocument> GetDiscoveryQueuePage() {
|
||||
if (!await RefreshSessionIfNeeded().ConfigureAwait(false)) {
|
||||
return null;
|
||||
@@ -368,6 +373,7 @@ namespace ArchiSteamFarm {
|
||||
const string request = SteamStoreURL + "/explore?l=english";
|
||||
return await WebBrowser.UrlGetToHtmlDocumentRetry(request).ConfigureAwait(false);
|
||||
}
|
||||
*/
|
||||
|
||||
internal async Task<HashSet<ulong>> GetFamilySharingSteamIDs() {
|
||||
if (!await RefreshSessionIfNeeded().ConfigureAwait(false)) {
|
||||
@@ -649,6 +655,7 @@ namespace ArchiSteamFarm {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
internal async Task<HtmlDocument> GetSteamAwardsPage() {
|
||||
if (!await RefreshSessionIfNeeded().ConfigureAwait(false)) {
|
||||
return null;
|
||||
@@ -657,6 +664,7 @@ namespace ArchiSteamFarm {
|
||||
const string request = SteamStoreURL + "/SteamAwards?l=english";
|
||||
return await WebBrowser.UrlGetToHtmlDocumentRetry(request).ConfigureAwait(false);
|
||||
}
|
||||
*/
|
||||
|
||||
internal async Task<byte?> GetTradeHoldDuration(ulong tradeID) {
|
||||
if (tradeID == 0) {
|
||||
@@ -952,6 +960,7 @@ namespace ArchiSteamFarm {
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
internal async Task<bool> SteamAwardsVote(byte voteID, uint appID) {
|
||||
if ((voteID == 0) || (appID == 0)) {
|
||||
Bot.ArchiLogger.LogNullError(nameof(voteID) + " || " + nameof(appID));
|
||||
@@ -977,6 +986,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
return await WebBrowser.UrlPostRetry(request, data).ConfigureAwait(false);
|
||||
}
|
||||
*/
|
||||
|
||||
private static uint GetAppIDFromMarketHashName(string hashName) {
|
||||
if (string.IsNullOrEmpty(hashName)) {
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace ArchiSteamFarm {
|
||||
private readonly SteamClient SteamClient;
|
||||
private readonly ConcurrentHashSet<ulong> SteamFamilySharingIDs = new ConcurrentHashSet<ulong>();
|
||||
private readonly SteamFriends SteamFriends;
|
||||
private readonly SteamSaleEvent SteamSaleEvent;
|
||||
//private readonly SteamSaleEvent SteamSaleEvent;
|
||||
private readonly SteamUser SteamUser;
|
||||
private readonly Trading Trading;
|
||||
|
||||
@@ -208,7 +208,7 @@ namespace ArchiSteamFarm {
|
||||
CardsFarmer = new CardsFarmer(this);
|
||||
CardsFarmer.SetInitialState(BotConfig.Paused);
|
||||
|
||||
SteamSaleEvent = new SteamSaleEvent(this);
|
||||
//SteamSaleEvent = new SteamSaleEvent(this);
|
||||
Trading = new Trading(this);
|
||||
|
||||
if (Program.GlobalConfig.Statistics) {
|
||||
@@ -235,7 +235,7 @@ namespace ArchiSteamFarm {
|
||||
InitializationSemaphore.Dispose();
|
||||
SteamFamilySharingIDs.Dispose();
|
||||
OwnedPackageIDs.Dispose();
|
||||
SteamSaleEvent.Dispose();
|
||||
//SteamSaleEvent.Dispose();
|
||||
Trading.Dispose();
|
||||
|
||||
// Those are objects that might be null and the check should be in-place
|
||||
|
||||
@@ -368,6 +368,7 @@ namespace ArchiSteamFarm.JSON {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
|
||||
[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")]
|
||||
internal sealed class NewDiscoveryQueueResponse { // Deserialized from JSON
|
||||
@@ -378,6 +379,7 @@ namespace ArchiSteamFarm.JSON {
|
||||
|
||||
private NewDiscoveryQueueResponse() { }
|
||||
}
|
||||
*/
|
||||
|
||||
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
|
||||
[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")]
|
||||
|
||||
@@ -1,4 +1,29 @@
|
||||
using System;
|
||||
/*
|
||||
_ _ _ ____ _ _____
|
||||
/ \ _ __ ___ | |__ (_)/ ___| | |_ ___ __ _ _ __ ___ | ___|__ _ _ __ _ __ ___
|
||||
/ _ \ | '__|/ __|| '_ \ | |\___ \ | __|/ _ \ / _` || '_ ` _ \ | |_ / _` || '__|| '_ ` _ \
|
||||
/ ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
|
||||
/_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
|
||||
|
||||
Copyright 2015-2016 Łukasz "JustArchi" Domeradzki
|
||||
Contact: JustArchi@JustArchi.net
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
@@ -157,4 +182,5 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
@@ -31,7 +31,7 @@ using System.Text;
|
||||
|
||||
namespace ArchiSteamFarm {
|
||||
internal static class Utilities {
|
||||
private static readonly Random Random = new Random();
|
||||
//private static readonly Random Random = new Random();
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
[SuppressMessage("ReSharper", "UnusedParameter.Global")]
|
||||
@@ -58,6 +58,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
internal static uint GetUnixTime() => (uint) DateTimeOffset.Now.ToUnixTimeSeconds();
|
||||
|
||||
/*
|
||||
internal static int RandomNext(int maxWithout) {
|
||||
if (maxWithout <= 0) {
|
||||
Program.ArchiLogger.LogNullError(nameof(maxWithout));
|
||||
@@ -72,6 +73,7 @@ namespace ArchiSteamFarm {
|
||||
return Random.Next(maxWithout);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
internal static string ToHumanReadable(this TimeSpan timeSpan) {
|
||||
// It's really dirty, I'd appreciate a lot if C# offered nice TimeSpan formatting by default
|
||||
|
||||
Reference in New Issue
Block a user