mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
Misc
This commit is contained in:
@@ -2646,6 +2646,16 @@ namespace ArchiSteamFarm {
|
||||
|
||||
foreach ((ArchiHandler.UserNotificationsCallback.EUserNotification notification, uint count) in callback.Notifications) {
|
||||
switch (notification) {
|
||||
case ArchiHandler.UserNotificationsCallback.EUserNotification.Gifts:
|
||||
bool newGifts = count > GiftsCount;
|
||||
GiftsCount = count;
|
||||
|
||||
if (newGifts && BotConfig.AcceptGifts) {
|
||||
ArchiLogger.LogGenericTrace(nameof(ArchiHandler.UserNotificationsCallback.EUserNotification.Gifts));
|
||||
Utilities.InBackground(Actions.AcceptDigitalGiftCards);
|
||||
}
|
||||
|
||||
break;
|
||||
case ArchiHandler.UserNotificationsCallback.EUserNotification.Items:
|
||||
bool newItems = count > ItemsCount;
|
||||
ItemsCount = count;
|
||||
@@ -2669,16 +2679,6 @@ namespace ArchiSteamFarm {
|
||||
Utilities.InBackground(Trading.OnNewTrade);
|
||||
}
|
||||
|
||||
break;
|
||||
case ArchiHandler.UserNotificationsCallback.EUserNotification.Gifts:
|
||||
bool newGifts = count > GiftsCount;
|
||||
GiftsCount = count;
|
||||
|
||||
if (newGifts && BotConfig.AcceptGifts) {
|
||||
ArchiLogger.LogGenericTrace(nameof(ArchiHandler.UserNotificationsCallback.EUserNotification.Gifts));
|
||||
Utilities.InBackground(Actions.AcceptDigitalGiftCards);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user