2016-03-07 22:02:42 +00:00
|
|
|
import splitWhitespace from '../libs/splitWhitespace';
|
|
|
|
|
import { capByLevel } from '../statHelpers';
|
|
|
|
|
import _ from 'lodash';
|
|
|
|
|
|
2016-03-08 16:45:14 +00:00
|
|
|
module.exports = function(user, req, cb) {
|
|
|
|
|
user.stats["class"] = 'warrior';
|
2016-03-07 22:02:42 +00:00
|
|
|
user.flags.classSelected = true;
|
|
|
|
|
user.preferences.disableClasses = true;
|
|
|
|
|
user.preferences.autoAllocate = true;
|
2016-03-08 16:49:18 +00:00
|
|
|
user.stats.str = capByLevel(user.stats.lvl);
|
2016-03-07 22:02:42 +00:00
|
|
|
user.stats.points = 0;
|
2016-03-08 16:45:14 +00:00
|
|
|
return typeof cb === "function" ? cb(null, _.pick(user, splitWhitespace('stats flags preferences'))) : void 0;
|
2016-03-07 22:02:42 +00:00
|
|
|
};
|