Fix needed exp in launcher

This commit is contained in:
CWX
2025-01-19 20:01:52 +00:00
parent f0602fa8ef
commit 263f868cdb
2 changed files with 3 additions and 4 deletions
@@ -61,7 +61,7 @@ public class ProfileController(
// Player hasn't completed profile creation process, send defaults
var currlvl = pmc?.Info?.Level.GetValueOrDefault(1);
var xpToNextLevel = _profileHelper.GetExperience((int)(currlvl ?? 1 + 1));
var xpToNextLevel = _profileHelper.GetExperience(((currlvl ?? 1) + 1));
if (pmc?.Info?.Level == null)
{
return new MiniProfile
+2 -3
View File
@@ -159,9 +159,8 @@ public class ProfileHelper(
if (playerLevel >= expTable.Length) // make sure to not go out of bounds
playerLevel = expTable.Length - 1;
foreach (var expLevel in expTable)
{
exp += expLevel.Experience;
for (var i = 0; i < playerLevel; i++) {
exp += expTable[i].Experience;
}
return exp;