diff --git a/package-lock.json b/package-lock.json
index 124448ad7e..9bfd50a72b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "habitica",
- "version": "4.189.1",
+ "version": "4.189.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index a094cb2e82..a9915382c4 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "habitica",
"description": "A habit tracker app which treats your goals like a Role Playing Game.",
- "version": "4.189.1",
+ "version": "4.189.2",
"main": "./website/server/index.js",
"dependencies": {
"@babel/core": "^7.12.10",
diff --git a/test/api/v3/integration/user/buy/POST-user_buy.test.js b/test/api/v3/integration/user/buy/POST-user_buy.test.js
index 4b39704500..aee180d753 100644
--- a/test/api/v3/integration/user/buy/POST-user_buy.test.js
+++ b/test/api/v3/integration/user/buy/POST-user_buy.test.js
@@ -70,6 +70,7 @@ describe('POST /user/buy/:key', () => {
it('buys a special spell', async () => {
const key = 'spookySparkles';
const item = content.special[key];
+ const stub = sinon.stub(item, 'canOwn').returns(true);
await user.update({ 'stats.gp': 250 });
const res = await user.post(`/user/buy/${key}`);
@@ -82,6 +83,8 @@ describe('POST /user/buy/:key', () => {
expect(res.message).to.equal(t('messageBought', {
itemText: item.text(),
}));
+
+ stub.restore();
});
it('allows for bulk purchases', async () => {
diff --git a/website/client/src/components/shops/buyModal.vue b/website/client/src/components/shops/buyModal.vue
index 2a4a793c20..e591f58fd4 100644
--- a/website/client/src/components/shops/buyModal.vue
+++ b/website/client/src/components/shops/buyModal.vue
@@ -161,16 +161,10 @@
-
-
- {{ limitedString }}
-
+ :endDate = "endDate"
+ />
+
+
+ {{ limitedString }}
+
+
+
+
+
+
diff --git a/website/client/src/components/shops/market/categoryRow.vue b/website/client/src/components/shops/market/categoryRow.vue
index 92012294b6..f34da10d0e 100644
--- a/website/client/src/components/shops/market/categoryRow.vue
+++ b/website/client/src/components/shops/market/categoryRow.vue
@@ -48,6 +48,12 @@ export default {
},
mixins: [pinUtils],
props: ['hideLocked', 'hidePinned', 'searchBy', 'sortBy', 'category'],
+ data () {
+ return {
+ timer: '',
+ limitedString: '',
+ };
+ },
computed: {
...mapState({
content: 'content',
@@ -60,9 +66,6 @@ export default {
return planGemLimits.convCap
+ this.user.purchased.plan.consecutive.gemCapExtra - this.user.purchased.plan.gemsBought;
},
- limitedString () {
- return this.$t('limitedOffer', { date: moment(seasonalShopConfig.dateRange.end).format('LL') });
- },
sortedMarketItems () {
let result = _map(this.category.items, e => ({
...e,
@@ -103,10 +106,43 @@ export default {
return result;
},
},
+ mounted () {
+ this.countdownString();
+ this.timer = setInterval(this.countdownString, 1000);
+ },
methods: {
itemSelected (item) {
this.$root.$emit('buyModal::showItem', item);
},
+ countdownString () {
+ const diffDuration = moment.duration(moment(seasonalShopConfig.dateRange.end).diff(moment()));
+
+ if (diffDuration.asSeconds() <= 0) {
+ this.limitedString = this.$t('noLongerAvailable');
+ } else if (diffDuration.days() > 0) {
+ this.limitedString = this.$t('limitedAvailabilityDays', {
+ days: diffDuration.days(),
+ hours: diffDuration.hours(),
+ minutes: diffDuration.minutes(),
+ });
+ } else if (diffDuration.asMinutes() > 2) {
+ this.limitedString = this.$t('limitedAvailabilityHours', {
+ hours: diffDuration.hours(),
+ minutes: diffDuration.minutes(),
+ });
+ } else {
+ this.limitedString = this.$t('limitedAvailabilityMinutes', {
+ minutes: diffDuration.minutes(),
+ seconds: diffDuration.seconds(),
+ });
+ }
+ },
+ cancelAutoUpdate () {
+ clearInterval(this.timer);
+ },
+ },
+ beforeDestroy () {
+ this.cancelAutoUpdate();
},
};
diff --git a/website/client/src/components/shops/quests/buyQuestModal.vue b/website/client/src/components/shops/quests/buyQuestModal.vue
index a11e3bc05c..f4dc300f9a 100644
--- a/website/client/src/components/shops/quests/buyQuestModal.vue
+++ b/website/client/src/components/shops/quests/buyQuestModal.vue
@@ -84,16 +84,10 @@
>
-
-
- {{ limitedString }}
-
+ :endDate="endDate"
+ />
diff --git a/website/client/src/components/shops/shopItem.vue b/website/client/src/components/shops/shopItem.vue
index f3bc30e77c..b6b60e0145 100644
--- a/website/client/src/components/shops/shopItem.vue
+++ b/website/client/src/components/shops/shopItem.vue
@@ -107,7 +107,7 @@
{{ limitedString }}
@@ -291,16 +291,18 @@ export default {
},
},
data () {
- return Object.freeze({
+ return {
itemId: uuid(),
- icons: {
+ icons: Object.freeze({
gems: svgGem,
gold: svgGold,
lock: svgLock,
hourglasses: svgHourglasses,
clock: svgClock,
- },
- });
+ }),
+ timer: '',
+ limitedString: '',
+ };
},
computed: {
showNotes () {
@@ -314,10 +316,10 @@ export default {
}
return 'gold';
},
- limitedString () {
- return this.item.owned === false ? ''
- : this.$t('limitedOffer', { date: moment(seasonalShopConfig.dateRange.end).format('LL') });
- },
+ },
+ mounted () {
+ this.countdownString();
+ this.timer = setInterval(this.countdownString, 1000);
},
methods: {
click () {
@@ -338,6 +340,35 @@ export default {
locked: this.item.locked,
};
},
+ countdownString () {
+ const diffDuration = moment.duration(moment(seasonalShopConfig.dateRange.end).diff(moment()));
+
+ if (diffDuration.asSeconds() <= 0) {
+ this.limitedString = this.$t('noLongerAvailable');
+ } else if (diffDuration.days() > 0) {
+ this.limitedString = this.$t('limitedAvailabilityDays', {
+ days: diffDuration.days(),
+ hours: diffDuration.hours(),
+ minutes: diffDuration.minutes(),
+ });
+ } else if (diffDuration.asMinutes() > 2) {
+ this.limitedString = this.$t('limitedAvailabilityHours', {
+ hours: diffDuration.hours(),
+ minutes: diffDuration.minutes(),
+ });
+ } else {
+ this.limitedString = this.$t('limitedAvailabilityMinutes', {
+ minutes: diffDuration.minutes(),
+ seconds: diffDuration.seconds(),
+ });
+ }
+ },
+ cancelAutoUpdate () {
+ clearInterval(this.timer);
+ },
+ },
+ beforeDestroy () {
+ this.cancelAutoUpdate();
},
};
diff --git a/website/common/locales/en/achievements.json b/website/common/locales/en/achievements.json
index c134a31411..85a64c9870 100644
--- a/website/common/locales/en/achievements.json
+++ b/website/common/locales/en/achievements.json
@@ -104,7 +104,7 @@
"achievementRedLetterDayText": "Has tamed all Red Mounts.",
"achievementRedLetterDayModalText": "You tamed all the Red Mounts!",
"achievementLegendaryBestiary": "Legendary Bestiary",
- "achievementLegendaryBestiaryText": "Has hatched all the mythical pets: Dragon, Flying Pig, Gryphon, Sea Serpent, and Unicorn!",
+ "achievementLegendaryBestiaryText": "Has hatched all standard colors of mythical pets: Dragon, Flying Pig, Gryphon, Sea Serpent, and Unicorn!",
"achievementLegendaryBestiaryModalText": "You collected all the mythical pets!",
"achievementSeasonalSpecialist": "Seasonal Specialist",
"achievementSeasonalSpecialistText": "Has completed all the Spring and Winter seasonal quests: Egg Hunt, Trapper Santa, and Find the Cub!",
diff --git a/website/common/locales/en/limited.json b/website/common/locales/en/limited.json
index 6ffc6d37ed..b6d262b1d7 100644
--- a/website/common/locales/en/limited.json
+++ b/website/common/locales/en/limited.json
@@ -28,10 +28,10 @@
"seasonalShopClosedTitle": "<%= linkStart %>Leslie<%= linkEnd %>",
"seasonalShopTitle": "<%= linkStart %>Seasonal Sorceress<%= linkEnd %>",
"seasonalShopClosedText": "The Seasonal Shop is currently closed!! It’s only open during Habitica’s four Grand Galas.",
- "seasonalShopSummerText": "Happy Summer Splash!! Would you like to buy some rare items? They’ll only be available until July 31st!",
- "seasonalShopFallText": "Happy Fall Festival!! Would you like to buy some rare items? They’ll only be available until October 31st!",
- "seasonalShopWinterText": "Happy Winter Wonderland!! Would you like to buy some rare items? They’ll only be available until January 31st!",
- "seasonalShopSpringText": "Happy Spring Fling!! Would you like to buy some rare items? They’ll only be available until April 30th!",
+ "seasonalShopSummerText": "Happy Summer Splash!! Would you like to buy some rare items? Be sure to get them before the Gala ends!",
+ "seasonalShopFallText": "Happy Fall Festival!! Would you like to buy some rare items? Be sure to get them before the Gala ends!",
+ "seasonalShopWinterText": "Happy Winter Wonderland!! Would you like to buy some rare items? Be sure to get them before the Gala ends!",
+ "seasonalShopSpringText": "Happy Spring Fling!! Would you like to buy some rare items? Be sure to get them before the Gala ends!",
"seasonalShopFallTextBroken": "Oh.... Welcome to the Seasonal Shop... We're stocking autumn Seasonal Edition goodies, or something... Everything here will be available to purchase during the Fall Festival event each year, but we're only open until October 31... I guess you should to stock up now, or you'll have to wait... and wait... and wait... *sigh*",
"seasonalShopBrokenText": "My pavilion!!!!!!! My decorations!!!! Oh, the Dysheartener's destroyed everything :( Please help defeat it in the Tavern so I can rebuild!",
"seasonalShopRebirth": "If you bought any of this equipment in the past but don't currently own it, you can repurchase it in the Rewards Column. Initially, you'll only be able to purchase the items for your current class (Warrior by default), but fear not, the other class-specific items will become available if you switch to that class.",
@@ -199,5 +199,6 @@
"howItWorks": "How it Works",
"g1g1HowItWorks": "Type in the username of the account you’d like to gift to. From there, pick the sub length you’d like to gift and check out. Your account will automatically be rewarded with the same level of subscription you just gifted.",
"limitations": "Limitations",
- "g1g1Limitations": "This is a limited time event that starts on December 17th at 8:00 AM ET (13:00 UTC) and will end January 7th at 8:00 PM ET (1:00 UTC). This promotion only applies when you gift to another Habitican. If you or your gift recipient already have a subscription, the gifted subscription will add months of credit that will only be used after the current subscription is canceled or expires."
+ "g1g1Limitations": "This is a limited time event that starts on December 17th at 8:00 AM ET (13:00 UTC) and will end January 7th at 8:00 PM ET (1:00 UTC). This promotion only applies when you gift to another Habitican. If you or your gift recipient already have a subscription, the gifted subscription will add months of credit that will only be used after the current subscription is canceled or expires.",
+ "noLongerAvailable": "This item is no longer available."
}
diff --git a/website/common/locales/en/npc.json b/website/common/locales/en/npc.json
index 684e6ac81b..517491c71c 100644
--- a/website/common/locales/en/npc.json
+++ b/website/common/locales/en/npc.json
@@ -125,5 +125,8 @@
"welcome3": "Progress in life and the game!",
"welcome3notes": "As you improve your life, your avatar will level up and unlock pets, quests, equipment, and more!",
"imReady": "Enter Habitica",
- "limitedOffer": "Available until <%= date %>"
+ "limitedOffer": "Available until <%= date %>",
+ "limitedAvailabilityDays": "Available for <%= days %>d <%= hours %>h <%= minutes %>m",
+ "limitedAvailabilityHours": "Available for <%= hours %>h <%= minutes %>m",
+ "limitedAvailabilityMinutes": "Available for <%= minutes %>m <%= seconds %>s"
}
diff --git a/website/common/script/content/gear/sets/special/index.js b/website/common/script/content/gear/sets/special/index.js
index 6153e64f85..6fc041b222 100644
--- a/website/common/script/content/gear/sets/special/index.js
+++ b/website/common/script/content/gear/sets/special/index.js
@@ -164,18 +164,22 @@ const armor = {
},
springRogue: {
set: 'stealthyKittySet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
springWarrior: {
set: 'mightyBunnySet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
springMage: {
set: 'magicMouseSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
springHealer: {
set: 'lovingPupSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summerRogue: {
@@ -234,18 +238,22 @@ const armor = {
},
spring2015Rogue: {
set: 'sneakySqueakerSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2015Warrior: {
set: 'bewareDogSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2015Mage: {
set: 'magicianBunnySet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2015Healer: {
set: 'comfortingKittySet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summer2015Rogue: {
@@ -310,18 +318,22 @@ const armor = {
},
spring2016Rogue: {
set: 'cleverDogSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2016Warrior: {
set: 'braveMouseSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2016Mage: {
set: 'grandMalkinSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2016Healer: {
set: 'springingBunnySet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summer2016Rogue: {
@@ -380,18 +392,22 @@ const armor = {
},
spring2017Rogue: {
set: 'spring2017SneakyBunnySet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2017Warrior: {
set: 'spring2017FelineWarriorSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2017Mage: {
set: 'spring2017CanineConjurorSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2017Healer: {
set: 'spring2017FloralMouseSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summer2017Rogue: {
@@ -450,18 +466,22 @@ const armor = {
},
spring2018Rogue: {
set: 'spring2018DucklingRogueSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2018Warrior: {
set: 'spring2018SunriseWarriorSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2018Mage: {
set: 'spring2018TulipMageSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2018Healer: {
set: 'spring2018GarnetHealerSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summer2018Rogue: {
@@ -526,18 +546,22 @@ const armor = {
},
spring2019Rogue: {
set: 'spring2019CloudRogueSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2019Warrior: {
set: 'spring2019OrchidWarriorSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2019Mage: {
set: 'spring2019AmberMageSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2019Healer: {
set: 'spring2019RobinHealerSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summer2019Rogue: {
@@ -603,18 +627,22 @@ const armor = {
},
spring2020Rogue: {
set: 'spring2020LapisLazuliRogueSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2020Warrior: {
set: 'spring2020BeetleWarriorSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2020Mage: {
set: 'spring2020PuddleMageSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2020Healer: {
set: 'spring2020IrisHealerSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summer2020Rogue: {
@@ -1171,18 +1199,22 @@ const head = {
},
springRogue: {
set: 'stealthyKittySet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
springWarrior: {
set: 'mightyBunnySet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
springMage: {
set: 'magicMouseSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
springHealer: {
set: 'lovingPupSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summerRogue: {
@@ -1241,18 +1273,22 @@ const head = {
},
spring2015Rogue: {
set: 'sneakySqueakerSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2015Warrior: {
set: 'bewareDogSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2015Mage: {
set: 'magicianBunnySet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2015Healer: {
set: 'comfortingKittySet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summer2015Rogue: {
@@ -1317,18 +1353,22 @@ const head = {
},
spring2016Rogue: {
set: 'cleverDogSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2016Warrior: {
set: 'braveMouseSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2016Mage: {
set: 'grandMalkinSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2016Healer: {
set: 'springingBunnySet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summer2016Rogue: {
@@ -1387,18 +1427,22 @@ const head = {
},
spring2017Rogue: {
set: 'spring2017SneakyBunnySet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2017Warrior: {
set: 'spring2017FelineWarriorSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2017Mage: {
set: 'spring2017CanineConjurorSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2017Healer: {
set: 'spring2017FloralMouseSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summer2017Rogue: {
@@ -1463,18 +1507,22 @@ const head = {
},
spring2018Rogue: {
set: 'spring2018DucklingRogueSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2018Warrior: {
set: 'spring2018SunriseWarriorSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2018Mage: {
set: 'spring2018TulipMageSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2018Healer: {
set: 'spring2018GarnetHealerSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summer2018Rogue: {
@@ -1545,18 +1593,22 @@ const head = {
},
spring2019Rogue: {
set: 'spring2019CloudRogueSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2019Warrior: {
set: 'spring2019OrchidWarriorSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2019Mage: {
set: 'spring2019AmberMageSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2019Healer: {
set: 'spring2019RobinHealerSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summer2019Rogue: {
@@ -1622,18 +1674,22 @@ const head = {
},
spring2020Rogue: {
set: 'spring2020LapisLazuliRogueSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2020Warrior: {
set: 'spring2020BeetleWarriorSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2020Mage: {
set: 'spring2020PuddleMageSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2020Healer: {
set: 'spring2020IrisHealerSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summer2020Rogue: {
@@ -1720,75 +1776,75 @@ Object.keys(gearEvents).forEach(event => {
const headAccessory = {
springRogue: {
- event: EVENTS.spring,
specialClass: 'rogue',
set: 'stealthyKittySet',
text: t('headAccessorySpecialSpringRogueText'),
notes: t('headAccessorySpecialSpringRogueNotes'),
value: 20,
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
springWarrior: {
- event: EVENTS.spring,
specialClass: 'warrior',
set: 'mightyBunnySet',
text: t('headAccessorySpecialSpringWarriorText'),
notes: t('headAccessorySpecialSpringWarriorNotes'),
value: 20,
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
springMage: {
- event: EVENTS.spring,
specialClass: 'wizard',
set: 'magicMouseSet',
text: t('headAccessorySpecialSpringMageText'),
notes: t('headAccessorySpecialSpringMageNotes'),
value: 20,
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
springHealer: {
- event: EVENTS.spring,
specialClass: 'healer',
set: 'lovingPupSet',
text: t('headAccessorySpecialSpringHealerText'),
notes: t('headAccessorySpecialSpringHealerNotes'),
value: 20,
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2015Rogue: {
- event: EVENTS.spring2015,
specialClass: 'rogue',
set: 'sneakySqueakerSet',
text: t('headAccessorySpecialSpring2015RogueText'),
notes: t('headAccessorySpecialSpring2015RogueNotes'),
value: 20,
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2015Warrior: {
- event: EVENTS.spring2015,
specialClass: 'warrior',
set: 'bewareDogSet',
text: t('headAccessorySpecialSpring2015WarriorText'),
notes: t('headAccessorySpecialSpring2015WarriorNotes'),
value: 20,
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2015Mage: {
- event: EVENTS.spring2015,
specialClass: 'wizard',
set: 'magicianBunnySet',
text: t('headAccessorySpecialSpring2015MageText'),
notes: t('headAccessorySpecialSpring2015MageNotes'),
value: 20,
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2015Healer: {
- event: EVENTS.spring2015,
specialClass: 'healer',
set: 'comfortingKittySet',
text: t('headAccessorySpecialSpring2015HealerText'),
notes: t('headAccessorySpecialSpring2015HealerNotes'),
value: 20,
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
bearEars: {
@@ -1856,75 +1912,75 @@ const headAccessory = {
canBuy: () => true,
},
spring2016Rogue: {
- event: EVENTS.spring2016,
specialClass: 'rogue',
set: 'cleverDogSet',
text: t('headAccessorySpecialSpring2016RogueText'),
notes: t('headAccessorySpecialSpring2016RogueNotes'),
value: 20,
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2016Warrior: {
- event: EVENTS.spring2016,
specialClass: 'warrior',
set: 'braveMouseSet',
text: t('headAccessorySpecialSpring2016WarriorText'),
notes: t('headAccessorySpecialSpring2016WarriorNotes'),
value: 20,
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2016Mage: {
- event: EVENTS.spring2016,
specialClass: 'wizard',
set: 'grandMalkinSet',
text: t('headAccessorySpecialSpring2016MageText'),
notes: t('headAccessorySpecialSpring2016MageNotes'),
value: 20,
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2016Healer: {
- event: EVENTS.spring2016,
specialClass: 'healer',
set: 'springingBunnySet',
text: t('headAccessorySpecialSpring2016HealerText'),
notes: t('headAccessorySpecialSpring2016HealerNotes'),
value: 20,
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2017Rogue: {
- event: EVENTS.spring2017,
specialClass: 'rogue',
set: 'spring2017SneakyBunnySet',
text: t('headAccessorySpecialSpring2017RogueText'),
notes: t('headAccessorySpecialSpring2017RogueNotes'),
value: 20,
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2017Warrior: {
- event: EVENTS.spring2017,
specialClass: 'warrior',
set: 'spring2017FelineWarriorSet',
text: t('headAccessorySpecialSpring2017WarriorText'),
notes: t('headAccessorySpecialSpring2017WarriorNotes'),
value: 20,
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2017Mage: {
- event: EVENTS.spring2017,
specialClass: 'wizard',
set: 'spring2017CanineConjurorSet',
text: t('headAccessorySpecialSpring2017MageText'),
notes: t('headAccessorySpecialSpring2017MageNotes'),
value: 20,
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2017Healer: {
- event: EVENTS.spring2017,
specialClass: 'healer',
set: 'spring2017FloralMouseSet',
text: t('headAccessorySpecialSpring2017HealerText'),
notes: t('headAccessorySpecialSpring2017HealerNotes'),
value: 20,
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
blackHeadband: {
@@ -2071,14 +2127,17 @@ const shield = {
},
springRogue: {
set: 'stealthyKittySet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
springWarrior: {
set: 'mightyBunnySet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
springHealer: {
set: 'lovingPupSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summerRogue: {
@@ -2119,14 +2178,17 @@ const shield = {
},
spring2015Rogue: {
set: 'sneakySqueakerSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2015Warrior: {
set: 'bewareDogSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2015Healer: {
set: 'comfortingKittySet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summer2015Rogue: {
@@ -2167,14 +2229,17 @@ const shield = {
},
spring2016Rogue: {
set: 'cleverDogSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2016Warrior: {
set: 'braveMouseSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2016Healer: {
set: 'springingBunnySet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summer2016Rogue: {
@@ -2215,14 +2280,17 @@ const shield = {
},
spring2017Rogue: {
set: 'spring2017SneakyBunnySet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2017Warrior: {
set: 'spring2017FelineWarriorSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2017Healer: {
set: 'spring2017FloralMouseSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summer2017Rogue: {
@@ -2263,14 +2331,17 @@ const shield = {
},
spring2018Rogue: {
set: 'spring2018DucklingRogueSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2018Warrior: {
set: 'spring2018SunriseWarriorSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2018Healer: {
set: 'spring2018GarnetHealerSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summer2018Rogue: {
@@ -2319,14 +2390,17 @@ const shield = {
},
spring2019Rogue: {
set: 'spring2019CloudRogueSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2019Warrior: {
set: 'spring2019OrchidWarriorSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2019Healer: {
set: 'spring2019RobinHealerSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summer2019Rogue: {
@@ -2384,14 +2458,17 @@ const shield = {
},
spring2020Rogue: {
set: 'spring2020LapisLazuliRogueSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2020Warrior: {
set: 'spring2020BeetleWarriorSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2020Healer: {
set: 'spring2020IrisHealerSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summer2020Warrior: {
@@ -2604,18 +2681,22 @@ const weapon = {
},
springRogue: {
set: 'stealthyKittySet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
springWarrior: {
set: 'mightyBunnySet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
springMage: {
set: 'magicMouseSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
springHealer: {
set: 'lovingPupSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summerRogue: {
@@ -2668,18 +2749,22 @@ const weapon = {
},
spring2015Rogue: {
set: 'sneakySqueakerSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2015Warrior: {
set: 'bewareDogSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2015Mage: {
set: 'magicianBunnySet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2015Healer: {
set: 'comfortingKittySet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summer2015Rogue: {
@@ -2732,18 +2817,22 @@ const weapon = {
},
spring2016Rogue: {
set: 'cleverDogSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2016Warrior: {
set: 'braveMouseSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2016Mage: {
set: 'grandMalkinSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2016Healer: {
set: 'springingBunnySet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summer2016Rogue: {
@@ -2796,18 +2885,22 @@ const weapon = {
},
spring2017Rogue: {
set: 'spring2017SneakyBunnySet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2017Warrior: {
set: 'spring2017FelineWarriorSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2017Mage: {
set: 'spring2017CanineConjurorSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2017Healer: {
set: 'spring2017FloralMouseSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summer2017Rogue: {
@@ -2860,18 +2953,22 @@ const weapon = {
},
spring2018Rogue: {
set: 'spring2018DucklingRogueSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2018Warrior: {
set: 'spring2018SunriseWarriorSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2018Mage: {
set: 'spring2018TulipMageSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2018Healer: {
set: 'spring2018GarnetHealerSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summer2018Rogue: {
@@ -2924,18 +3021,22 @@ const weapon = {
},
spring2019Rogue: {
set: 'spring2019CloudRogueSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2019Warrior: {
set: 'spring2019OrchidWarriorSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2019Mage: {
set: 'spring2019AmberMageSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2019Healer: {
set: 'spring2019RobinHealerSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summer2019Rogue: {
@@ -3003,18 +3104,22 @@ const weapon = {
},
spring2020Rogue: {
set: 'spring2020LapisLazuliRogueSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2020Warrior: {
set: 'spring2020BeetleWarriorSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2020Mage: {
set: 'spring2020PuddleMageSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
spring2020Healer: {
set: 'spring2020IrisHealerSet',
+ event: EVENTS.spring2021,
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summer2020Rogue: {
diff --git a/website/common/script/content/hatching-potions.js b/website/common/script/content/hatching-potions.js
index 22558f8b66..52957737c5 100644
--- a/website/common/script/content/hatching-potions.js
+++ b/website/common/script/content/hatching-potions.js
@@ -197,7 +197,7 @@ const premium = {
}),
event: EVENTS.spring2021,
canBuy () {
- return moment().isBefore('2021-04-30T20:00-04:00');
+ return moment().isBefore(EVENTS.spring2021.end);
},
},
Glass: {
@@ -353,7 +353,7 @@ const premium = {
previousDate: t('marchYYYY', { year: 2020 }),
}),
canBuy () {
- return moment().isBefore('2021-04-30T20:00-04:00');
+ return moment().isBefore(EVENTS.spring2021.end);
},
},
Fluorite: {
@@ -440,7 +440,7 @@ const premium = {
date: t('dateEndMarch'),
}),
canBuy () {
- return moment().isBefore('2021-04-30T20:00-04:00');
+ return moment().isBefore(EVENTS.spring2021.end);
},
},
};
@@ -455,7 +455,7 @@ const wacky = {
previousDate: t('marchYYYY', { year: 2019 }),
}),
canBuy () {
- return moment().isBetween('2021-04-01T08:00-05:00', '2021-04-30T20:00-05:00');
+ return moment().isBetween('2021-04-01T08:00-05:00', EVENTS.spring2021.end);
},
},
Dessert: {
diff --git a/website/common/script/content/quests.js b/website/common/script/content/quests.js
index 7c4a35ee7a..869cf00cdc 100644
--- a/website/common/script/content/quests.js
+++ b/website/common/script/content/quests.js
@@ -518,8 +518,9 @@ const quests = {
completion: t('questEggHuntCompletion'),
value: 1,
category: 'pet',
+ event: EVENTS.spring2021,
canBuy () {
- return moment().isBefore('2021-04-30T20:00-05:00');
+ return moment().isBefore(EVENTS.spring2021.end);
},
collect: {
plainEgg: {
@@ -3587,7 +3588,7 @@ const quests = {
category: 'hatchingPotion',
event: EVENTS.spring2021,
canBuy () {
- return moment().isBetween('2021-04-01T08:00-05:00', '2021-04-30T20:00-05:00');
+ return moment().isBefore(EVENTS.spring2021.end);
},
boss: {
name: t('questWaffleBoss'),
diff --git a/website/common/script/content/spells.js b/website/common/script/content/spells.js
index 93940c3ba5..f208c519a1 100644
--- a/website/common/script/content/spells.js
+++ b/website/common/script/content/spells.js
@@ -1,10 +1,12 @@
import each from 'lodash/each';
+import moment from 'moment';
import t from './translation';
import { NotAuthorized, BadRequest } from '../libs/errors';
import statsComputed from '../libs/statsComputed'; // eslint-disable-line import/no-cycle
import setDebuffPotionItems from '../libs/setDebuffPotionItems'; // eslint-disable-line import/no-cycle
import crit from '../fns/crit'; // eslint-disable-line import/no-cycle
import updateStats from '../fns/updateStats';
+import { EVENTS } from './constants';
/*
---------------------------------------------------------------
@@ -286,6 +288,9 @@ spells.special = {
previousPurchase: true,
target: 'user',
notes: t('spellSpecialSnowballAuraNotes'),
+ canOwn () {
+ return false;
+ },
cast (user, target, req) {
if (!user.items.special.snowball) throw new NotAuthorized(t('spellNotOwned')(req.language));
target.stats.buffs.snowball = true;
@@ -319,6 +324,9 @@ spells.special = {
previousPurchase: true,
target: 'user',
notes: t('spellSpecialSpookySparklesNotes'),
+ canOwn () {
+ return false;
+ },
cast (user, target, req) {
if (!user.items.special.spookySparkles) throw new NotAuthorized(t('spellNotOwned')(req.language));
target.stats.buffs.snowball = false;
@@ -352,6 +360,10 @@ spells.special = {
previousPurchase: true,
target: 'user',
notes: t('spellSpecialShinySeedNotes'),
+ event: EVENTS.spring2021,
+ canOwn () {
+ return moment().isBetween('2021-04-06T08:00-05:00', EVENTS.spring2021.end);
+ },
cast (user, target, req) {
if (!user.items.special.shinySeed) throw new NotAuthorized(t('spellNotOwned')(req.language));
target.stats.buffs.snowball = false;
@@ -385,6 +397,9 @@ spells.special = {
previousPurchase: true,
target: 'user',
notes: t('spellSpecialSeafoamNotes'),
+ canOwn () {
+ return false;
+ },
cast (user, target, req) {
if (!user.items.special.seafoam) throw new NotAuthorized(t('spellNotOwned')(req.language));
target.stats.buffs.snowball = false;
@@ -419,6 +434,9 @@ spells.special = {
silent: true,
target: 'user',
notes: t('nyeCardNotes'),
+ canOwn () {
+ return false;
+ },
cast (user, target) {
if (user === target) {
if (!user.achievements.nye) user.achievements.nye = 0;
@@ -456,6 +474,9 @@ spells.special = {
silent: true,
target: 'user',
notes: t('valentineCardNotes'),
+ canOwn () {
+ return false;
+ },
cast (user, target) {
if (user === target) {
if (!user.achievements.valentine) user.achievements.valentine = 0;
diff --git a/website/common/script/libs/getItemInfo.js b/website/common/script/libs/getItemInfo.js
index f59f5d0f9a..c9d26ac32c 100644
--- a/website/common/script/libs/getItemInfo.js
+++ b/website/common/script/libs/getItemInfo.js
@@ -178,6 +178,7 @@ export default function getItemInfo (user, type, item, officialPinnedItems, lang
class: `inventory_special_${item.key}`,
path: `spells.special.${item.key}`,
pinType: 'seasonalSpell',
+ event: item.event,
};
break;
case 'debuffPotion':
@@ -215,6 +216,7 @@ export default function getItemInfo (user, type, item, officialPinnedItems, lang
purchaseType: 'quests',
path: `quests.${item.key}`,
pinType: 'seasonalQuest',
+ event: item.event,
};
break;
case 'gear':
diff --git a/website/common/script/libs/shops-seasonal.config.js b/website/common/script/libs/shops-seasonal.config.js
index 52ad6c91a6..72bd5db381 100644
--- a/website/common/script/libs/shops-seasonal.config.js
+++ b/website/common/script/libs/shops-seasonal.config.js
@@ -18,8 +18,8 @@ export default {
currentSeason: SHOP_OPEN ? upperFirst(CURRENT_EVENT.season) : 'Closed',
dateRange: {
- start: SHOP_OPEN ? moment(CURRENT_EVENT.start).format('YYYY-MM-DD') : moment().subtract(1, 'days').toDate(),
- end: SHOP_OPEN ? moment(CURRENT_EVENT.end).format('YYYY-MM-DD') : moment().subtract(1, 'seconds').toDate(),
+ start: SHOP_OPEN ? moment(CURRENT_EVENT.start) : moment().subtract(1, 'days').toDate(),
+ end: SHOP_OPEN ? moment(CURRENT_EVENT.end) : moment().subtract(1, 'seconds').toDate(),
},
availableSets: SHOP_OPEN
@@ -37,7 +37,7 @@ export default {
}
: {},
- availableSpells: moment().isBetween('2021-04-06T08:00-05:00', '2021-04-30T20:00-05:00')
+ availableSpells: SHOP_OPEN && moment().isAfter('2021-04-06T08:00-05:00')
? [
'shinySeed',
]
diff --git a/website/common/script/libs/shops.js b/website/common/script/libs/shops.js
index 41d0cd466d..397506381a 100644
--- a/website/common/script/libs/shops.js
+++ b/website/common/script/libs/shops.js
@@ -157,6 +157,7 @@ shops.getMarketGearCategories = function getMarketGear (user, language) {
if (
gearItem.specialClass === classType
&& user.items.gear.owned[gearItem.key] !== false
+ && gearItem.set === seasonalShopConfig.pinnedSets[gearItem.specialClass]
) return gearItem.canOwn(classShift);
return false;
});
diff --git a/website/server/libs/analyticsService.js b/website/server/libs/analyticsService.js
index 995a911fd5..3082c78d42 100644
--- a/website/server/libs/analyticsService.js
+++ b/website/server/libs/analyticsService.js
@@ -100,6 +100,8 @@ function _formatUserData (user) {
if (user.purchased && user.purchased.plan.planId) {
properties.subscription = user.purchased.plan.planId;
+ } else {
+ properties.subscription = null;
}
if (user._ABtests) {