fix(quests): bug fix to multi-drop

This commit is contained in:
Tyler Renelle
2014-01-21 15:08:11 -08:00
parent f16654d235
commit f478d10c20
2 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -148,7 +148,7 @@ GroupSchema.methods.finishQuest = function(quest, cb) {
case 'eggs':
case 'food':
case 'hatchingPotions':
updates['$inc']['items.'+quest.drop.type+'.'+dropK] = 1;
updates['$inc']['items.'+item.type+'.'+dropK] = _.where(quest.drop.items,{type:item.type,key:item.key}).length;
break;
case 'pets':
updates['$set']['items.pets.'+dropK] = 5;