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.
This commit is contained in:
Doğu Deniz Uğur
2018-05-13 17:07:20 +03:00
committed by Matteo Pagliazzi
parent 6c64a1cd8c
commit 38d78de4b3

View File

@@ -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;
},
},
};
</script>