Fix purchasing some hatching potions

This commit is contained in:
Phillip Thelen
2024-05-17 15:44:08 +02:00
parent becdf640b5
commit 57deadaa5c
4 changed files with 78 additions and 117 deletions

View File

@@ -97,7 +97,7 @@ export default async function purchase (user, req = {}, analytics) {
const { price, item } = getItemAndPrice(user, type, key, req);
if (type === 'hatchingPotions' && item.premium === true) {
if (type === 'hatchingPotions' && item.premium === true && item.questPotion !== true) {
const matchers = getScheduleMatchingGroup('premiumHatchingPotions');
if (!matchers.match(item.key)) {
throw new NotAuthorized(i18n.t('messageNotAvailable', req.language));