This commit is contained in:
JustArchi
2019-04-04 00:07:41 +02:00
parent 99574f60bd
commit 2260ed48ab

View File

@@ -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;
}
}