Seasonal gear fix (#15255)
* cleanup unneeded season definitions * assign first winter seasonal gear right season * add missing winter definition * Fix enddate for winter galas * fix lint * fix halloween sprites * set season * fix loading habitoween sprites * add missing customization shop sprites * Fix test * update customization shop sprites
@@ -123,7 +123,7 @@ describe('GET /world-state', () => {
|
||||
|
||||
const res = await requester().get('/world-state');
|
||||
|
||||
expect(res.npcImageSuffix).to.equal('winter');
|
||||
expect(res.npcImageSuffix).to.equal('fall');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -123,6 +123,12 @@ describe('Content Schedule', () => {
|
||||
expect(matchers.seasonalGear.end).to.eql(moment.utc(`2024-06-21T${String(switchoverTime).padStart(2, '0')}:00:00.000Z`).toDate());
|
||||
});
|
||||
|
||||
it('sets the end date for a winter gala', () => {
|
||||
const date = new Date('2024-12-22');
|
||||
const matchers = getAllScheduleMatchingGroups(date);
|
||||
expect(matchers.seasonalGear.end).to.eql(moment.utc(`2025-03-21T${String(switchoverTime).padStart(2, '0')}:00:00.000Z`).toDate());
|
||||
});
|
||||
|
||||
it('contains content for repeating events', () => {
|
||||
const date = new Date('2024-04-15');
|
||||
const matchers = getAllScheduleMatchingGroups(date);
|
||||
|
||||
|
After Width: | Height: | Size: 3.9 KiB |
BIN
website/client/public/static/npc/birthday/customizations_npc.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
BIN
website/client/public/static/npc/fall/customizations_npc.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
BIN
website/client/public/static/npc/nye/customizations_npc.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
BIN
website/client/public/static/npc/spring/customizations_npc.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
BIN
website/client/public/static/npc/summer/customizations_npc.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
BIN
website/client/public/static/npc/winter/customizations_npc.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
@@ -109,6 +109,7 @@
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import find from 'lodash/find';
|
||||
import shops from '@/../../common/script/libs/shops';
|
||||
import throttle from 'lodash/throttle';
|
||||
import { mapState } from '@/libs/store';
|
||||
@@ -145,9 +146,16 @@ export default {
|
||||
return Object.values(this.viewOptions).some(g => g.selected);
|
||||
},
|
||||
imageURLs () {
|
||||
const currentEvent = find(this.currentEventList, event => Boolean(event.season));
|
||||
if (!currentEvent) {
|
||||
return {
|
||||
background: 'url(/static/npc/normal/customizations_background.png)',
|
||||
npc: 'url(/static/npc/normal/customizations_npc.png)',
|
||||
};
|
||||
}
|
||||
return {
|
||||
background: 'url(/static/npc/normal/customizations_background.png)',
|
||||
npc: 'url(/static/npc/normal/customizations_npc.png)',
|
||||
background: `url(/static/npc/${currentEvent.season}/customizations_background.png)`,
|
||||
npc: `url(/static/npc/${currentEvent.season}/customizations_npc.png)`,
|
||||
};
|
||||
},
|
||||
categories () {
|
||||
|
||||
@@ -480,7 +480,7 @@ export default {
|
||||
});
|
||||
|
||||
await this.triggerGetWorldState();
|
||||
this.currentEvent = _find(this.currentEventList, event => Boolean(['winter', 'spring', 'summer', 'fall'].includes(event.season)));
|
||||
this.currentEvent = _find(this.currentEventList, event => Boolean(event.season));
|
||||
this.imageURLs.background = `url(/static/npc/${this.currentEvent.season}/seasonal_shop_opened_background.png)`;
|
||||
this.imageURLs.npc = `url(/static/npc/${this.currentEvent.season}/seasonal_shop_opened_npc.png)`;
|
||||
},
|
||||
|
||||
@@ -80,6 +80,8 @@ export const REPEATING_EVENTS = {
|
||||
start: new Date('1970-10-30T08:00-05:00'),
|
||||
end: new Date('1970-11-01T23:59-05:00'),
|
||||
foodSeason: 'Candy',
|
||||
season: 'habitoween',
|
||||
npcImageSuffix: '_halloween',
|
||||
},
|
||||
harvestFeast: {
|
||||
start: new Date('1970-11-22T08:00-05:00'),
|
||||
|
||||
@@ -844,6 +844,7 @@ export function assembleScheduledMatchers (date) {
|
||||
const gala = GALA_SCHEDULE[getGalaIndex(date)];
|
||||
const galaMatchers = gala.matchers;
|
||||
galaMatchers.forEach(matcher => {
|
||||
matcher.startMonth = gala.startMonth;
|
||||
matcher.endMonth = gala.endMonth;
|
||||
});
|
||||
items.push(...galaMatchers);
|
||||
@@ -887,6 +888,9 @@ function makeEndDate (checkedDate, matcher) {
|
||||
end.minute(0);
|
||||
end.second(0);
|
||||
if (matcher.endMonth !== undefined) {
|
||||
if (matcher.startMonth && matcher.startMonth > matcher.endMonth) {
|
||||
end.year(checkedDate.getFullYear() + 1);
|
||||
}
|
||||
end.month(matcher.endMonth);
|
||||
} else if (end.date() <= checkedDate.getDate()) {
|
||||
end = moment(end).add(1, 'months');
|
||||
|
||||
@@ -149,6 +149,7 @@ const armor = {
|
||||
notes: t('armorSpecialYetiNotes', { con: 9 }),
|
||||
con: 9,
|
||||
value: 90,
|
||||
season: 'winter',
|
||||
},
|
||||
ski: {
|
||||
specialClass: 'rogue',
|
||||
@@ -157,6 +158,7 @@ const armor = {
|
||||
notes: t('armorSpecialSkiNotes', { per: 15 }),
|
||||
per: 15,
|
||||
value: 90,
|
||||
season: 'winter',
|
||||
},
|
||||
candycane: {
|
||||
specialClass: 'wizard',
|
||||
@@ -165,6 +167,7 @@ const armor = {
|
||||
notes: t('armorSpecialCandycaneNotes', { int: 9 }),
|
||||
int: 9,
|
||||
value: 90,
|
||||
season: 'winter',
|
||||
},
|
||||
snowflake: {
|
||||
specialClass: 'healer',
|
||||
@@ -173,6 +176,7 @@ const armor = {
|
||||
notes: t('armorSpecialSnowflakeNotes', { con: 15 }),
|
||||
con: 15,
|
||||
value: 90,
|
||||
season: 'winter',
|
||||
},
|
||||
birthday: {
|
||||
event: EVENTS.birthday,
|
||||
@@ -182,51 +186,39 @@ const armor = {
|
||||
},
|
||||
springRogue: {
|
||||
set: 'stealthyKittySet',
|
||||
season: 'spring',
|
||||
},
|
||||
springWarrior: {
|
||||
set: 'mightyBunnySet',
|
||||
season: 'spring',
|
||||
},
|
||||
springMage: {
|
||||
set: 'magicMouseSet',
|
||||
season: 'spring',
|
||||
},
|
||||
springHealer: {
|
||||
set: 'lovingPupSet',
|
||||
season: 'spring',
|
||||
},
|
||||
summerRogue: {
|
||||
set: 'roguishPirateSet',
|
||||
season: 'summer',
|
||||
},
|
||||
summerWarrior: {
|
||||
set: 'daringSwashbucklerSet',
|
||||
season: 'summer',
|
||||
},
|
||||
summerMage: {
|
||||
set: 'emeraldMermageSet',
|
||||
season: 'summer',
|
||||
},
|
||||
summerHealer: {
|
||||
set: 'reefSeahealerSet',
|
||||
season: 'summer',
|
||||
},
|
||||
fallRogue: {
|
||||
set: 'vampireSmiterSet',
|
||||
season: 'fall',
|
||||
},
|
||||
fallWarrior: {
|
||||
set: 'monsterOfScienceSet',
|
||||
season: 'fall',
|
||||
},
|
||||
fallMage: {
|
||||
set: 'witchyWizardSet',
|
||||
season: 'fall',
|
||||
},
|
||||
fallHealer: {
|
||||
set: 'mummyMedicSet',
|
||||
season: 'fall',
|
||||
},
|
||||
winter2015Rogue: {
|
||||
set: 'icicleDrakeSet',
|
||||
@@ -1228,6 +1220,7 @@ const head = {
|
||||
notes: t('headSpecialYetiNotes', { str: 9 }),
|
||||
str: 9,
|
||||
value: 60,
|
||||
season: 'winter',
|
||||
},
|
||||
ski: {
|
||||
specialClass: 'rogue',
|
||||
@@ -1236,6 +1229,7 @@ const head = {
|
||||
notes: t('headSpecialSkiNotes', { per: 9 }),
|
||||
per: 9,
|
||||
value: 60,
|
||||
season: 'winter',
|
||||
},
|
||||
candycane: {
|
||||
specialClass: 'wizard',
|
||||
@@ -1244,6 +1238,7 @@ const head = {
|
||||
notes: t('headSpecialCandycaneNotes', { per: 7 }),
|
||||
per: 7,
|
||||
value: 60,
|
||||
season: 'winter',
|
||||
},
|
||||
snowflake: {
|
||||
specialClass: 'healer',
|
||||
@@ -1252,54 +1247,43 @@ const head = {
|
||||
notes: t('headSpecialSnowflakeNotes', { int: 7 }),
|
||||
int: 7,
|
||||
value: 60,
|
||||
season: 'winter',
|
||||
},
|
||||
springRogue: {
|
||||
set: 'stealthyKittySet',
|
||||
season: 'spring',
|
||||
},
|
||||
springWarrior: {
|
||||
set: 'mightyBunnySet',
|
||||
season: 'spring',
|
||||
},
|
||||
springMage: {
|
||||
set: 'magicMouseSet',
|
||||
season: 'spring',
|
||||
},
|
||||
springHealer: {
|
||||
set: 'lovingPupSet',
|
||||
season: 'spring',
|
||||
},
|
||||
summerRogue: {
|
||||
set: 'roguishPirateSet',
|
||||
season: 'summer',
|
||||
},
|
||||
summerWarrior: {
|
||||
set: 'daringSwashbucklerSet',
|
||||
season: 'summer',
|
||||
},
|
||||
summerMage: {
|
||||
set: 'emeraldMermageSet',
|
||||
season: 'summer',
|
||||
},
|
||||
summerHealer: {
|
||||
set: 'reefSeahealerSet',
|
||||
season: 'summer',
|
||||
},
|
||||
fallRogue: {
|
||||
set: 'vampireSmiterSet',
|
||||
season: 'fall',
|
||||
},
|
||||
fallWarrior: {
|
||||
set: 'monsterOfScienceSet',
|
||||
season: 'fall',
|
||||
},
|
||||
fallMage: {
|
||||
set: 'witchyWizardSet',
|
||||
season: 'fall',
|
||||
},
|
||||
fallHealer: {
|
||||
set: 'mummyMedicSet',
|
||||
season: 'fall',
|
||||
},
|
||||
winter2015Rogue: {
|
||||
set: 'icicleDrakeSet',
|
||||
@@ -2114,6 +2098,7 @@ const shield = {
|
||||
notes: t('shieldSpecialYetiNotes', { con: 7 }),
|
||||
con: 7,
|
||||
value: 70,
|
||||
season: 'winter',
|
||||
},
|
||||
ski: {
|
||||
specialClass: 'rogue',
|
||||
@@ -2122,6 +2107,7 @@ const shield = {
|
||||
notes: t('weaponSpecialSkiNotes', { str: 8 }),
|
||||
str: 8,
|
||||
value: 90,
|
||||
season: 'winter',
|
||||
},
|
||||
snowflake: {
|
||||
specialClass: 'healer',
|
||||
@@ -2130,42 +2116,34 @@ const shield = {
|
||||
notes: t('shieldSpecialSnowflakeNotes', { con: 9 }),
|
||||
con: 9,
|
||||
value: 70,
|
||||
season: 'winter',
|
||||
},
|
||||
springRogue: {
|
||||
set: 'stealthyKittySet',
|
||||
season: 'spring',
|
||||
},
|
||||
springWarrior: {
|
||||
set: 'mightyBunnySet',
|
||||
season: 'spring',
|
||||
},
|
||||
springHealer: {
|
||||
set: 'lovingPupSet',
|
||||
season: 'spring',
|
||||
},
|
||||
summerRogue: {
|
||||
set: 'roguishPirateSet',
|
||||
season: 'summer',
|
||||
},
|
||||
summerWarrior: {
|
||||
set: 'daringSwashbucklerSet',
|
||||
season: 'summer',
|
||||
},
|
||||
summerHealer: {
|
||||
set: 'reefSeahealerSet',
|
||||
season: 'summer',
|
||||
},
|
||||
fallRogue: {
|
||||
set: 'vampireSmiterSet',
|
||||
season: 'fall',
|
||||
},
|
||||
fallWarrior: {
|
||||
set: 'monsterOfScienceSet',
|
||||
season: 'fall',
|
||||
},
|
||||
fallHealer: {
|
||||
set: 'mummyMedicSet',
|
||||
season: 'fall',
|
||||
},
|
||||
winter2015Rogue: {
|
||||
set: 'icicleDrakeSet',
|
||||
@@ -2665,6 +2643,7 @@ const weapon = {
|
||||
notes: t('weaponSpecialYetiNotes', { str: 15 }),
|
||||
str: 15,
|
||||
value: 90,
|
||||
season: 'winter',
|
||||
},
|
||||
ski: {
|
||||
specialClass: 'rogue',
|
||||
@@ -2673,6 +2652,7 @@ const weapon = {
|
||||
notes: t('weaponSpecialSkiNotes', { str: 8 }),
|
||||
str: 8,
|
||||
value: 90,
|
||||
season: 'winter',
|
||||
},
|
||||
candycane: {
|
||||
specialClass: 'wizard',
|
||||
@@ -2683,6 +2663,7 @@ const weapon = {
|
||||
int: 15,
|
||||
per: 7,
|
||||
value: 160,
|
||||
season: 'winter',
|
||||
},
|
||||
snowflake: {
|
||||
specialClass: 'healer',
|
||||
@@ -2691,6 +2672,7 @@ const weapon = {
|
||||
notes: t('weaponSpecialSnowflakeNotes', { int: 9 }),
|
||||
int: 9,
|
||||
value: 90,
|
||||
season: 'winter',
|
||||
},
|
||||
springRogue: {
|
||||
set: 'stealthyKittySet',
|
||||
|
||||
@@ -35,7 +35,7 @@ api.getWorldState = {
|
||||
}
|
||||
|
||||
worldState.currentEventList.forEach(event => {
|
||||
if (event.npcImageSuffix) {
|
||||
if (event.npcImageSuffix && !worldState.npcImageSuffix) {
|
||||
worldState.npcImageSuffix = event.npcImageSuffix;
|
||||
}
|
||||
});
|
||||
|
||||