Added max phoenix spirits to 4
This commit is contained in:
@@ -9,6 +9,7 @@ namespace TOOHUCardAPI.Data
|
||||
public static int PointsPerLevelNormal { get; set; }
|
||||
public static int FirstWinBonusPointsMin { get; set; }
|
||||
public static int FirstWinBonusPointsMax { get; set; }
|
||||
public static int MaxPhoenixSpirits { get; set; }
|
||||
public static int PointsPerKey { get; set; }
|
||||
public static int MaxKeyPurchaseAmount { get; set; }
|
||||
public static string StarterDeckGroupKey { get; set; }
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace TOOHUCardAPI.Data.Services
|
||||
public async Task<int> ChangePowerMaxTotal(long steamId, int amt)
|
||||
{
|
||||
User user = await _userRepository.GetUser(steamId);
|
||||
user.PowerMaxTotal = Math.Clamp(user.PowerMaxTotal + amt, 0, int.MaxValue);
|
||||
user.PowerMaxTotal = Math.Clamp(user.PowerMaxTotal + amt, 0, AppSettings.MaxPhoenixSpirits);
|
||||
await _userRepository.UpdateUser(user);
|
||||
_logger.LogInformation("User {SteamId} changed the number of MaxPower items they had by {Amount}", user.SteamId, amt);
|
||||
return user.PowerMaxTotal;
|
||||
|
||||
Reference in New Issue
Block a user