Fixes 2017/10/09 (#9176)

* fix(quests): correctly divide owner-only/all

* fix(equipment): clarify locked items
This commit is contained in:
Sabe Jones 2017-10-09 22:15:52 -05:00 committed by GitHub
parent 7e1ae6a571
commit d88a8247d1
3 changed files with 28 additions and 8 deletions

View file

@ -1,10 +1,16 @@
<template lang="pug">
div
h4.popover-content-title {{ itemText }}
.popover-content-text {{ itemNotes }}
.popover-content-attr(v-for="attr in ATTRIBUTES", :key="attr")
span.popover-content-attr-key {{ `${$t(attr)}: ` }}
span.popover-content-attr-val {{ `+${item[attr]}` }}
div(v-if='item.locked')
h4.popover-content-title Locked Item
.popover-content-text(v-if='item.specialClass') {{ `${$t('classLockedItem')}` }}
.popover-content-text(v-else) {{ `${$t('tierLockedItem')}` }}
p
div(v-else)
h4.popover-content-title {{ itemText }}
.popover-content-text {{ itemNotes }}
.popover-content-attr(v-for="attr in ATTRIBUTES", :key="attr")
span.popover-content-attr-key {{ `${$t(attr)}: ` }}
span.popover-content-attr-val {{ `+${item[attr]}` }}
</template>
<script>

View file

@ -7,8 +7,12 @@
div.reward-item(v-if="item.drop.gp != 0")
span.svg-icon.inline.icon(v-html="icons.gold")
span.reward-text {{ $t('amountGold', { amount: item.drop.gp }) }}
h3.text-center(v-if='item.drop.items') {{$t('questOwnerRewards')}}
div.reward-item(v-for="drop in item.drop.items")
div.reward-item(v-for='drop in getDropsList(item.drop.items, false)')
span.icon
div(:class="getDropIcon(drop)")
span.reward-text {{ getDropName(drop) }}
h3.text-center(v-if='getDropsList(item.drop.items, true).length > 0') {{$t('questOwnerRewards')}}
div.reward-item(v-for='drop in getDropsList(item.drop.items, true)')
span.icon
div(:class="getDropIcon(drop)")
span.reward-text {{ getDropName(drop) }}
@ -60,7 +64,6 @@
</style>
<script>
import svgGold from 'assets/svg/gold.svg';
import svgExperience from 'assets/svg/experience.svg';
@ -96,6 +99,15 @@
getDropName (drop) {
return drop.text();
},
getDropsList (drops, ownerOnly) {
return drops.filter(function dropsList (drop) {
if (ownerOnly) {
return drop.onlyOwner;
} else {
return !drop.onlyOwner;
}
});
},
},
props: {
item: {

View file

@ -10,6 +10,8 @@
"gearNotOwned": "You do not own this item.",
"noGearItemsOfType": "You don't own any of these.",
"noGearItemsOfClass": "You already have all your class equipment! More will be released during the Grand Galas, near the solstices and equinoxes.",
"classLockedItem": "This item is only available to a specific class. Change your class under the User icon > Settings > Character Build!",
"tierLockedItem": "This item is only available once you've purchased the previous items in sequence. Keep working your way up!",
"sortByType": "Type",
"sortByPrice": "Price",