Added support for savemaxpower
This commit is contained in:
@@ -29,6 +29,14 @@ namespace TOOHUCardAPI.Data.Services
|
||||
_logger.LogInformation($"User with steamid {user.SteamId} was given {points} points. New total: {user.Point}");
|
||||
}
|
||||
|
||||
public async Task<int> ChangePowerMaxTotal(string steamId, int amt)
|
||||
{
|
||||
User user = await _userRepository.GetUser(steamId);
|
||||
user.PowerMaxTotal = Math.Clamp(user.PowerMaxTotal + amt, 0, int.MaxValue);
|
||||
await _userRepository.UpdateUser(user);
|
||||
return user.PowerMaxTotal;
|
||||
}
|
||||
|
||||
public async Task<int> LevelUpCard(string steamId, string itemName, int levelIncrease)
|
||||
{
|
||||
User user = await _userRepository.GetUser(steamId);
|
||||
|
||||
Reference in New Issue
Block a user