diff --git a/common/locales/en/npc.json b/common/locales/en/npc.json index fa93c62ec7..f8146abc72 100644 --- a/common/locales/en/npc.json +++ b/common/locales/en/npc.json @@ -35,7 +35,7 @@ "mustPurchaseToSet": "Must purchase <%= val %> to set it on <%= key %>.", "typeRequired": "Type is required", "keyRequired": "Key is required", - "notAccteptedType": "Type must be in [eggs, hatchingPotions, food, quests, gear]", + "notAccteptedType": "Type must be in [eggs, hatchingPotions, premiumHatchingPotions, food, quests, gear]", "contentKeyNotFound": "Key not found for Content <%= type %>", "plusOneGem": "+1 Gem", "typeNotSellable": "Type is not sellable. Must be one of the following <%= acceptedTypes %>", diff --git a/common/script/content/constants.js b/common/script/content/constants.js index 839bd6aa33..a1de597104 100644 --- a/common/script/content/constants.js +++ b/common/script/content/constants.js @@ -48,6 +48,7 @@ export const ITEM_LIST = { headAccessory: { localeKey: 'headAccessory', isEquipment: true }, eyewear: { localeKey: 'eyewear', isEquipment: true }, hatchingPotions: { localeKey: 'hatchingPotion', isEquipment: false }, + premiumHatchingPotions: { localeKey: 'hatchingPotion', isEquipment: false }, eggs: { localeKey: 'eggSingular', isEquipment: false }, quests: { localeKey: 'quest', isEquipment: false }, food: { localeKey: 'foodText', isEquipment: false }, diff --git a/common/script/libs/shops.js b/common/script/libs/shops.js index 9afc32a8e3..a4fc7905fd 100644 --- a/common/script/libs/shops.js +++ b/common/script/libs/shops.js @@ -59,7 +59,7 @@ shops.getMarketCategories = function getMarket (user, language) { categories.push(hatchingPotionsCategory); let premiumHatchingPotionsCategory = { - identifier: 'magicHatchingPotions', + identifier: 'premiumHatchingPotions', text: i18n.t('magicHatchingPotions', language), notes: i18n.t('premiumPotionNoDropExplanation', language), }; diff --git a/common/script/ops/purchase.js b/common/script/ops/purchase.js index 79eb0475d4..9668def076 100644 --- a/common/script/ops/purchase.js +++ b/common/script/ops/purchase.js @@ -60,10 +60,11 @@ module.exports = function purchase (user, req = {}, analytics) { ]; } - let acceptedTypes = ['eggs', 'hatchingPotions', 'food', 'quests', 'gear']; + let acceptedTypes = ['eggs', 'hatchingPotions', 'premiumHatchingPotions', 'food', 'quests', 'gear']; if (acceptedTypes.indexOf(type) === -1) { throw new NotFound(i18n.t('notAccteptedType', req.language)); } + if (type === 'premiumHatchingPotions') type = 'hatchingPotions'; if (type === 'gear') { item = content.gear.flat[key];