2016-08-02 12:13:15 +02:00
|
|
|
|
using GUI;
|
|
|
|
|
|
using SteamKit2;
|
|
|
|
|
|
|
|
|
|
|
|
// ReSharper disable once CheckNamespace
|
|
|
|
|
|
namespace ArchiSteamFarm {
|
|
|
|
|
|
internal static class Events {
|
2016-08-02 22:51:09 +02:00
|
|
|
|
internal static void OnBotShutdown() { }
|
|
|
|
|
|
|
2016-08-02 12:13:15 +02:00
|
|
|
|
internal static void OnStateUpdated(Bot bot, SteamFriends.PersonaStateCallback callback) {
|
|
|
|
|
|
if ((bot == null) || (callback == null)) {
|
|
|
|
|
|
Logging.LogNullError(nameof(bot) + " || " + nameof(callback));
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BotStatusForm form;
|
|
|
|
|
|
if (!BotStatusForm.BotForms.TryGetValue(bot.BotName, out form)) {
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
form.OnStateUpdated(callback);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|