From 38d78de4b3313db8629dc1f226e26ef2e2ac7cf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fu=20Deniz=20U=C4=9Fur?= Date: Sun, 13 May 2018 17:07:20 +0300 Subject: [PATCH] New method added to displaying locked quest popover message in shop (#10346) isBuyingDependentOnPrevious () method checks if item.key of quest is in a list of quests whose unlock condition is not dependent on the completition of previous quest. --- website/client/components/shops/quests/index.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website/client/components/shops/quests/index.vue b/website/client/components/shops/quests/index.vue index e3f9171745..f63b93fa94 100644 --- a/website/client/components/shops/quests/index.vue +++ b/website/client/components/shops/quests/index.vue @@ -139,7 +139,7 @@ h4.popover-content-title(v-else) {{ item.text }} .popover-content-text(v-if='item.locked && item.key === "lostMasterclasser1"') {{ `${$t('questUnlockLostMasterclasser')}` }} .popover-content-text(v-if='item.locked && item.unlockCondition && item.unlockCondition.incentiveThreshold') {{ `${$t('loginIncentiveQuest', {count: item.unlockCondition.incentiveThreshold})}` }} - .popover-content-text(v-if='item.locked && item.previous') {{ `${$t('unlockByQuesting', {title: item.previous})}` }} + .popover-content-text(v-if='item.locked && item.previous && isBuyingDependentOnPrevious(item)') {{ `${$t('unlockByQuesting', {title: item.previous})}` }} .popover-content-text(v-if='item.lvl > user.stats.lvl') {{ `${$t('mustLvlQuest', {level: item.lvl})}` }} questInfo(v-if='!item.locked', :quest="item") @@ -486,6 +486,11 @@ export default { this.$root.$emit('bv::show::modal', 'buy-quest-modal'); }, + isBuyingDependentOnPrevious (item) { + let questsNotDependentToPrevious = ['moon2', 'moon3']; + if (item.key in questsNotDependentToPrevious) return false; + return true; + }, }, };