Fix needed exp in launcher
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user