Improve shutdown looting

As discussed in http://steamcommunity.com/groups/ascfarm/discussions/1/1483232961032339275/ - it's possible that SendOnFarmingFinished + ShutdownOnFarmingFinished bot will shutdown before master receives the trade and accepts it through default trading preferences.

This can be easily solved by caching SteamID and using it instead. While I'm at it, let's rewrite other parts that made use of SteamID as well.
This commit is contained in:
JustArchi
2017-10-13 09:05:08 +02:00
parent 426fb12221
commit acae0d8d0e
4 changed files with 26 additions and 23 deletions

View File

@@ -71,7 +71,7 @@ namespace ArchiSteamFarm {
const string request = URL + "/api/HeartBeat";
Dictionary<string, string> data = new Dictionary<string, string>(2) {
{ "SteamID", Bot.SteamID.ToString() },
{ "SteamID", Bot.CachedSteamID.ToString() },
{ "Guid", Program.GlobalDatabase.Guid.ToString("N") }
};
@@ -138,7 +138,7 @@ namespace ArchiSteamFarm {
const string request = URL + "/api/Announce";
Dictionary<string, string> data = new Dictionary<string, string>(8) {
{ "SteamID", Bot.SteamID.ToString() },
{ "SteamID", Bot.CachedSteamID.ToString() },
{ "Guid", Program.GlobalDatabase.Guid.ToString("N") },
{ "Nickname", nickname },
{ "AvatarHash", avatarHash },