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

@@ -13,7 +13,6 @@
<testing />
<testingletiant />
<rebirth-enabled />
<drops-enabled />
<contributor />
<won-challenge />
<ultimate-gear />
@@ -34,6 +33,7 @@
<lost-masterclasser />
<mind-over-matter />
<onboarding-complete />
<first-drops />
</div>
</template>
@@ -128,7 +128,6 @@ import questInvitation from './achievements/questInvitation';
import testing from './achievements/testing';
import testingletiant from './achievements/testingletiant';
import rebirthEnabled from './achievements/rebirthEnabled';
import dropsEnabled from './achievements/dropsEnabled';
import contributor from './achievements/contributor';
import invitedFriend from './achievements/invitedFriend';
import joinedChallenge from './achievements/joinedChallenge';
@@ -144,6 +143,7 @@ import mindOverMatter from './achievements/mindOverMatter';
import loginIncentives from './achievements/login-incentives';
import onboardingComplete from './achievements/onboardingComplete';
import verifyUsername from './settings/verifyUsername';
import firstDrops from './achievements/firstDrops';
const NOTIFICATIONS = {
CHALLENGE_JOINED_ACHIEVEMENT: {
@@ -333,7 +333,6 @@ export default {
testing,
testingletiant,
rebirthEnabled,
dropsEnabled,
contributor,
loginIncentives,
verifyUsername,
@@ -342,12 +341,12 @@ export default {
mindOverMatter,
justAddWater,
onboardingComplete,
firstDrops,
},
mixins: [notifications, guide],
data () {
// Levels that already display modals and should not trigger generic Level Up
const unlockLevels = {
3: 'drop system',
10: 'class system',
50: 'Orb of Rebirth',
};
@@ -361,7 +360,7 @@ export default {
const handledNotifications = {};
[
'GUILD_PROMPT', 'DROPS_ENABLED', 'REBIRTH_ENABLED', 'WON_CHALLENGE', 'STREAK_ACHIEVEMENT',
'GUILD_PROMPT', 'REBIRTH_ENABLED', 'WON_CHALLENGE', 'STREAK_ACHIEVEMENT',
'ULTIMATE_GEAR_ACHIEVEMENT', 'REBIRTH_ACHIEVEMENT', 'GUILD_JOINED_ACHIEVEMENT',
'CHALLENGE_JOINED_ACHIEVEMENT', 'INVITED_FRIEND_ACHIEVEMENT', 'NEW_CONTRIBUTOR_LEVEL',
'CRON', 'SCORED_TASK', 'LOGIN_INCENTIVE', 'ACHIEVEMENT_ALL_YOUR_BASE', 'ACHIEVEMENT_BACK_TO_BASICS',
@@ -369,7 +368,7 @@ export default {
'ACHIEVEMENT_MOUNT_MASTER', 'ACHIEVEMENT_TRIAD_BINGO', 'ACHIEVEMENT_DUST_DEVIL', 'ACHIEVEMENT_ARID_AUTHORITY',
'ACHIEVEMENT_MONSTER_MAGUS', 'ACHIEVEMENT_UNDEAD_UNDERTAKER', 'ACHIEVEMENT_PRIMED_FOR_PAINTING',
'ACHIEVEMENT_PEARLY_PRO', 'ACHIEVEMENT_TICKLED_PINK', 'ACHIEVEMENT_ROSY_OUTLOOK', 'ACHIEVEMENT',
'ONBOARDING_COMPLETE',
'ONBOARDING_COMPLETE', 'FIRST_DROPS',
].forEach(type => {
handledNotifications[type] = true;
});
@@ -732,6 +731,13 @@ export default {
// @TODO: Use factory function instead
switch (notification.type) { // eslint-disable-line default-case
case 'FIRST_DROPS':
if (notification.data) {
this.$store.state.firstDropsOptions.egg = notification.data.egg;
this.$store.state.firstDropsOptions.hatchingPotion = notification.data.hatchingPotion;
this.$root.$emit('bv::show::modal', 'first-drops');
}
break;
case 'GUILD_PROMPT':
// @TODO: I'm pretty sure we can find better names for these
if (notification.data.textletiant === -1) {
@@ -740,9 +746,6 @@ export default {
this.$root.$emit('bv::show::modal', 'testingletiant');
}
break;
case 'DROPS_ENABLED':
this.$root.$emit('bv::show::modal', 'drops-enabled');
break;
case 'REBIRTH_ENABLED':
this.$root.$emit('bv::show::modal', 'rebirth-enabled');
break;