Files
habitica/website/common/script/libs/hasClass.js
Carl Vuorinen 71c0939a15 Fix API early Stat Point allocation (#10680)
* Refactor hasClass check to common so it can be used in shared & server-side code

* Check that user has selected class before allocating stat points
2018-09-21 16:55:55 +02:00

9 lines
210 B
JavaScript

// Check if user has Class system enabled
module.exports = function hasClass (member) {
return (
member.stats.lvl >= 10 &&
!member.preferences.disableClasses &&
member.flags.classSelected
);
};