adapt reset to v2 and remove deleted files from gulpfile

This commit is contained in:
Matteo Pagliazzi
2016-04-12 18:50:02 +02:00
parent c64ba3e8d7
commit 004b032084
3 changed files with 7 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
import resetGear from '../fns/resetGear';
import i18n from '../i18n';
module.exports = function reset (user, tasks = []) {
module.exports = function reset (user, tasks = [], req = {}) {
user.stats.hp = 50;
user.stats.lvl = 1;
user.stats.gp = 0;
@@ -24,5 +24,9 @@ module.exports = function reset (user, tasks = []) {
message: i18n.t('resetComplete'),
};
if (req.v2 === true) {
return user;
} else {
return response;
}
};

View File

@@ -11,11 +11,6 @@ const COMMON_FILES = [
// @TODO remove these negations as the files are converted over.
'!./common/script/content/index.js',
'!./common/script/fns/randomDrop.js',
'!./common/script/libs/countExists.js',
'!./common/script/libs/encodeiCalLink.js',
'!./common/script/libs/friendlyTimestamp.js',
'!./common/script/libs/newChatMessages.js',
'!./common/script/libs/planGemLimits.js',
'!./common/script/public/**/*.js',
];
const TEST_FILES = [

View File

@@ -878,7 +878,7 @@ _.each(shared.ops, function(op,k){
if (['rebirth', 'reroll', 'reset'].indexOf(k) !== -1) { // proxy ops that change tasks directly to v3
if (k === 'rebirth') k = 'userRebirth'; // the name is different in v3
if (k === 'reroll') k = 'userReroll';
// if (k === 'reset') k = 'resetUser';
if (k === 'reset') k = 'userReset';
api[k] = function (req, res, next) {
req.v2 = true;