mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Removed update stats notification (#10339)
* Removed update stats notification * Removed level up hook
This commit is contained in:
@@ -20,7 +20,7 @@ module.exports = function updateStats (user, stats, req = {}, analytics) {
|
||||
if (stats.exp >= experienceToNextLevel) {
|
||||
user.stats.exp = stats.exp;
|
||||
|
||||
const initialLvl = user.stats.lvl;
|
||||
// const initialLvl = user.stats.lvl;
|
||||
|
||||
while (stats.exp >= experienceToNextLevel) {
|
||||
stats.exp -= experienceToNextLevel;
|
||||
@@ -50,12 +50,13 @@ module.exports = function updateStats (user, stats, req = {}, analytics) {
|
||||
}
|
||||
}
|
||||
|
||||
const newLvl = user.stats.lvl;
|
||||
|
||||
if (user.addNotification) user.addNotification('LEVELED_UP', {
|
||||
initialLvl,
|
||||
newLvl,
|
||||
});
|
||||
// @TODO: Tmp disable to see if this is causing concurrency
|
||||
// const newLvl = user.stats.lvl;
|
||||
//
|
||||
// if (user.addNotification) user.addNotification('LEVELED_UP', {
|
||||
// initialLvl,
|
||||
// newLvl,
|
||||
// });
|
||||
}
|
||||
|
||||
user.stats.exp = stats.exp;
|
||||
|
||||
Reference in New Issue
Block a user