Adventure Guide Prep (#11883)

* WIP(adventure): prereqs

* WIP(drops): new modal

* WIP(adventure): analytics fixes etc

* feat(adventure): random egg+potion on 2nd task

* fix(lint): noworkies

* fix(modal): correctly construct classes

* fix(tests): expectations and escape

* fix(first-drops): address comments

* fix(first-drops): don't give random drops until first drops

* fix(drops): remove more Level 3 references

* refactor(drops): no need for cloning

* refactor(drops): unnecessary export

* fix(first-drops): force sync

* fix(first-drops): move to server

* fix(first-drops): escape in case we get here with >0 items

* fix(lint): line length

* fix(pet-food): remove unused string
This commit is contained in:
Sabe Jones
2020-03-07 13:03:13 -06:00
committed by GitHub
parent db1bda1bcd
commit bd8e67a2ea
31 changed files with 273 additions and 144 deletions

View File

@@ -189,7 +189,7 @@ function _updateCounter (task, direction, times) {
}
}
export default function scoreTask (options = {}, req = {}) {
export default function scoreTask (options = {}, req = {}, analytics) {
const {
user, task, direction, times = 1, cron = false,
} = options;
@@ -347,7 +347,7 @@ export default function scoreTask (options = {}, req = {}) {
if (!user.achievements.completedTask && cron === false && direction === 'up' && user.addAchievement) {
user.addAchievement('completedTask');
checkOnboardingStatus(user);
checkOnboardingStatus(user, analytics);
}
return [delta];