diff --git a/src/Services/AchievementService.cs b/src/Services/AchievementService.cs index 44fea83..1d38e98 100644 --- a/src/Services/AchievementService.cs +++ b/src/Services/AchievementService.cs @@ -81,10 +81,16 @@ namespace sodoff.Services { }; viking.AchievementPoints.Add(xpPoints); } + + int initialPoints = xpPoints.Value; xpPoints.Value += value ?? 0; - - if (xpPoints.Value < 0) { + + if (value > 0 && initialPoints > xpPoints.Value) { xpPoints.Value = int.MaxValue; + value = int.MaxValue - initialPoints; + } + if (xpPoints.Value < 0) { + xpPoints.Value = 0; value = 0; }