Merge branch 'develop' into unlock-fixes
This commit is contained in:
@@ -192,6 +192,11 @@ const basicAchievs = {
|
||||
titleKey: 'achievementBugBonanza',
|
||||
textKey: 'achievementBugBonanzaText',
|
||||
},
|
||||
bareNecessities: {
|
||||
icon: 'achievement-bareNecessities',
|
||||
titleKey: 'achievementBareNecessities',
|
||||
textKey: 'achievementBareNecessitiesText',
|
||||
},
|
||||
};
|
||||
Object.assign(achievementsData, basicAchievs);
|
||||
|
||||
|
||||
@@ -221,6 +221,21 @@ const bundles = {
|
||||
type: 'quests',
|
||||
value: 7,
|
||||
},
|
||||
jungleBuddies: {
|
||||
key: 'jungleBuddies',
|
||||
text: t('jungleBuddiesText'),
|
||||
notes: t('jungleBuddiesNotes', { date: moment('2020-05-31').format('LL') }),
|
||||
bundleKeys: [
|
||||
'monkey',
|
||||
'sloth',
|
||||
'treeling',
|
||||
],
|
||||
canBuy () {
|
||||
return moment().isBetween('2020-05-19', '2020-06-02');
|
||||
},
|
||||
type: 'quests',
|
||||
value: 7,
|
||||
},
|
||||
};
|
||||
|
||||
export default bundles;
|
||||
|
||||
@@ -39,7 +39,7 @@ export const EVENTS = {
|
||||
summer2019: { start: '2019-06-18', end: '2019-08-02' },
|
||||
fall2019: { start: '2019-09-24', end: '2019-11-02' },
|
||||
winter2020: { start: '2019-12-19', end: '2020-02-02' },
|
||||
spring2020: { start: '2019-03-17', end: '2020-05-02' },
|
||||
spring2020: { start: '2020-03-17', end: '2020-05-02' },
|
||||
};
|
||||
|
||||
export const SEASONAL_SETS = {
|
||||
@@ -282,6 +282,11 @@ export const QUEST_SERIES_ACHIEVEMENTS = {
|
||||
'snail',
|
||||
'spider',
|
||||
],
|
||||
bareNecessities: [
|
||||
'monkey',
|
||||
'sloth',
|
||||
'treeling',
|
||||
],
|
||||
};
|
||||
|
||||
export const ANIMAL_COLOR_ACHIEVEMENTS = [
|
||||
|
||||
@@ -86,6 +86,13 @@ const premium = {
|
||||
value: 2,
|
||||
text: t('hatchingPotionFairy'),
|
||||
limited: true,
|
||||
_addlNotes: t('eventAvailabilityReturning', {
|
||||
availableDate: t('dateEndMay'),
|
||||
previousDate: t('mayYYYY', { year: 2017 }),
|
||||
}),
|
||||
canBuy () {
|
||||
return moment().isBefore('2020-06-02');
|
||||
},
|
||||
},
|
||||
Floral: {
|
||||
value: 2,
|
||||
@@ -222,6 +229,13 @@ const premium = {
|
||||
value: 2,
|
||||
text: t('hatchingPotionSunshine'),
|
||||
limited: true,
|
||||
_addlNotes: t('eventAvailabilityReturning', {
|
||||
availableDate: t('dateEndMay'),
|
||||
previousDate: t('mayYYYY', { year: 2019 }),
|
||||
}),
|
||||
canBuy () {
|
||||
return moment().isBefore('2020-06-02');
|
||||
},
|
||||
},
|
||||
Bronze: {
|
||||
value: 2,
|
||||
|
||||
@@ -3621,6 +3621,9 @@ each(quests, (v, key) => {
|
||||
defaults(v, {
|
||||
key,
|
||||
canBuy () {
|
||||
if (v.event) {
|
||||
return moment().isBetween(v.event.start, v.event.end);
|
||||
}
|
||||
return true;
|
||||
},
|
||||
});
|
||||
|
||||
@@ -5,6 +5,7 @@ import reduce from 'lodash/reduce';
|
||||
import filter from 'lodash/filter';
|
||||
import pickBy from 'lodash/pickBy';
|
||||
import size from 'lodash/size';
|
||||
import moment from 'moment';
|
||||
import content from '../content/index';
|
||||
import i18n from '../i18n';
|
||||
import { daysSince } from '../cron';
|
||||
@@ -149,7 +150,7 @@ export default function randomDrop (user, options, req = {}, analytics) {
|
||||
user.items.lastDrop.date = Number(new Date());
|
||||
user.items.lastDrop.count += 1;
|
||||
|
||||
if (analytics) {
|
||||
if (analytics && moment().diff(user.auth.timestamps.created, 'days') < 7) {
|
||||
analytics.track('dropped item', {
|
||||
uuid: user._id,
|
||||
itemKey: drop.key,
|
||||
|
||||
@@ -200,6 +200,7 @@ function _getBasicAchievements (user, language) {
|
||||
_addSimple(result, user, { path: 'tickledPink', language });
|
||||
_addSimple(result, user, { path: 'rosyOutlook', language });
|
||||
_addSimple(result, user, { path: 'bugBonanza', language });
|
||||
_addSimple(result, user, { path: 'bareNecessities', language });
|
||||
|
||||
_addSimpleWithMasterCount(result, user, { path: 'beastMaster', language });
|
||||
_addSimpleWithMasterCount(result, user, { path: 'mountMaster', language });
|
||||
|
||||
@@ -26,18 +26,19 @@ export default function buyMysterySet (user, req = {}, analytics) {
|
||||
|
||||
each(mysterySet.items, item => {
|
||||
user.items.gear.owned[item.key] = true;
|
||||
if (analytics) {
|
||||
analytics.track('acquire item', {
|
||||
uuid: user._id,
|
||||
itemKey: item.key,
|
||||
itemType: 'Subscriber Gear',
|
||||
acquireMethod: 'Hourglass',
|
||||
category: 'behavior',
|
||||
headers: req.headers,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
if (analytics) {
|
||||
analytics.track('acquire item', {
|
||||
uuid: user._id,
|
||||
itemKey: mysterySet.key,
|
||||
itemType: 'Subscriber Gear',
|
||||
acquireMethod: 'Hourglass',
|
||||
category: 'behavior',
|
||||
headers: req.headers,
|
||||
});
|
||||
}
|
||||
|
||||
// Here we need to trigger vue reactivity through reassign object
|
||||
user.items.gear.owned = {
|
||||
...user.items.gear.owned,
|
||||
|
||||
Reference in New Issue
Block a user