quests: temporary fix to users who have left a party mid-quest

This commit is contained in:
Tyler Renelle
2013-12-26 15:39:09 -07:00
parent aa3767afd9
commit 2a63dfe687
2 changed files with 65 additions and 61 deletions
+2 -5
View File
@@ -204,12 +204,9 @@ api.cron = function(req, res, next) {
function(cb){
user.save(cb); // make sure to save the cron effects
},
function(saved, count, cb) {
Group.findOne({type: 'party', members: {'$in': [user._id]}}, cb);
},
function(group, cb){
function(saved, count, cb){
var type = quest.boss ? 'boss' : 'collect';
group[type+'Quest'](user,progress,cb);
Group[type+'Quest'](user,progress,cb);
},
function(){
var cb = arguments[arguments.length-1];