Changed daily keys and points

This commit is contained in:
2021-11-16 13:19:16 -05:00
parent 896b8c8dd1
commit 1cbe2c35a5
4 changed files with 11 additions and 5 deletions

View File

@@ -33,10 +33,11 @@ namespace TOOHUCardAPI.Data.Services
private async Task<User> HandleDailyLoginBonus(User user)
{
user.KeyTotal += AppSettings.DailyKeyBonus;
int dailyBonus = user.PetLevel + 1;
user.KeyTotal += dailyBonus;
user.LastDailyLoginBonus = DateTime.Now;;
await _userRepository.UpdateUser(user);
_logger.LogInformation("User {SteamId} received a daily login bonus. Keys earned: {DailyKeyBonus}. New Key total: {KeyTotal}", user.SteamId, AppSettings.DailyKeyBonus, user.KeyTotal);
_logger.LogInformation("User {SteamId} received a daily login bonus. Keys earned: {DailyKeyBonus}. New Key total: {KeyTotal}", user.SteamId, dailyBonus, user.KeyTotal);
return user;
}