public static long GetRemainingExp(this User u) { var nextLvlExp = ExperienceManager.CalculateExpForLevel(u.Level + 1); var exp = nextLvlExp - u.ExpCnt; if (exp < 1) { exp = 1; } return(nextLvlExp - u.ExpCnt); }