fix new profiles being null
This commit is contained in:
@@ -106,8 +106,8 @@ public class ProfileController
|
||||
var maxLvl = _profileHelper.GetMaxLevel();
|
||||
|
||||
// Player hasn't completed profile creation process, send defaults
|
||||
var currlvl = pmc.Info.Level.GetValueOrDefault(1);
|
||||
var xpToNextLevel = _profileHelper.GetExperience((int)(currlvl + 1));
|
||||
var currlvl = pmc?.Info?.Level.GetValueOrDefault(1);
|
||||
var xpToNextLevel = _profileHelper.GetExperience((int)(currlvl ?? 1 + 1));
|
||||
if (pmc?.Info?.Level == null)
|
||||
{
|
||||
return new MiniProfile
|
||||
|
||||
Reference in New Issue
Block a user