fix issue with seasonal quest scheduling

This commit is contained in:
Phillip Thelen
2024-02-15 18:33:40 +01:00
committed by Sabe Jones
parent fe2c02679e
commit 3540a274b3
2 changed files with 28 additions and 3 deletions

View File

@@ -672,6 +672,13 @@ export const GALA_SCHEDULE = {
'shinySeed',
],
},
{
type: 'seasonalQuests',
items: [
'egg',
'waffle',
],
},
{
type: 'customizations',
matcher: customizationMatcher([
@@ -695,6 +702,11 @@ export const GALA_SCHEDULE = {
'seafoam',
],
},
{
type: 'seasonalQuests',
items: [
],
},
{
type: 'customizations',
matcher: customizationMatcher([
@@ -717,6 +729,11 @@ export const GALA_SCHEDULE = {
'spookySparkles',
],
},
{
type: 'seasonalQuests',
items: [
],
},
{
type: 'customizations',
matcher: customizationMatcher([
@@ -799,10 +816,17 @@ export function getScheduleMatchingGroup (type, date) {
matchers: [],
items: [],
match (key) {
if (this.items.length > 0 && !inListMatcher(this.items)(key)) {
return false;
if (this.matchers.length === 0) {
if (this.items.length > 0) {
return inListMatcher(this.items)(key);
}
} else {
if (this.items.length > 0 && !inListMatcher(this.items)(key)) {
return false;
}
return this.matchers.every(m => m(key));
}
return this.matchers.every(m => m(key));
return false;
},
};
}