fix seasonal gear filtering

This commit is contained in:
Phillip Thelen
2024-05-14 11:56:04 +02:00
parent 6591f6780c
commit efe8cff1ad
3 changed files with 26 additions and 10 deletions
@@ -17,6 +17,7 @@ function isSeasonalEventKey (key) {
function fillSpecialGear (gearItems, gearType, value, stats) {
Object.keys(gearItems).forEach(key => {
if (isSeasonalEventKey(key)) {
const season = key.split(/(?=[A-Z])/)[1];
let klass = key.split(/(?=[A-Z])/)[1].toLowerCase();
if (klass === 'mage') {
klass = 'wizard';
@@ -29,6 +30,7 @@ function fillSpecialGear (gearItems, gearType, value, stats) {
text: t(`${textKey}Text`),
notes: t(`${textKey}Notes`, stats),
value: actualValue,
season,
}, stats);
if (klass === 'wizard') {
defaults(gearItems[key], {
+1
View File
@@ -149,6 +149,7 @@ shops.getMarketGearCategories = function getMarketGear (user, language) {
const result = filter(content.gear.flat, gearItem => {
if (gearItem.klass === classType) return true;
if (gearItem.season) return false;
const classShift = {
items: user.items,
stats: {