Skip to content

Commit e801547

Browse files
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
1 parent fc11941 commit e801547

28 files changed

+40
-38
lines changed

test/api/v3/integration/world-state/GET-world-state.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ describe('GET /world-state', () => {
123123

124124
const res = await requester().get('/world-state');
125125

126-
expect(res.npcImageSuffix).to.equal('winter');
126+
expect(res.npcImageSuffix).to.equal('fall');
127127
});
128128
});
129129
});

test/content/schedule.test.js

+6
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ describe('Content Schedule', () => {
123123
expect(matchers.seasonalGear.end).to.eql(moment.utc(`2024-06-21T${String(switchoverTime).padStart(2, '0')}:00:00.000Z`).toDate());
124124
});
125125

126+
it('sets the end date for a winter gala', () => {
127+
const date = new Date('2024-12-22');
128+
const matchers = getAllScheduleMatchingGroups(date);
129+
expect(matchers.seasonalGear.end).to.eql(moment.utc(`2025-03-21T${String(switchoverTime).padStart(2, '0')}:00:00.000Z`).toDate());
130+
});
131+
126132
it('contains content for repeating events', () => {
127133
const date = new Date('2024-04-15');
128134
const matchers = getAllScheduleMatchingGroups(date);
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

website/client/src/components/shops/customizations/index.vue

+10-2
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
</style>
110110

111111
<script>
112+
import find from 'lodash/find';
112113
import shops from '@/../../common/script/libs/shops';
113114
import throttle from 'lodash/throttle';
114115
import { mapState } from '@/libs/store';
@@ -145,9 +146,16 @@ export default {
145146
return Object.values(this.viewOptions).some(g => g.selected);
146147
},
147148
imageURLs () {
149+
const currentEvent = find(this.currentEventList, event => Boolean(event.season));
150+
if (!currentEvent) {
151+
return {
152+
background: 'url(/static/npc/normal/customizations_background.png)',
153+
npc: 'url(/static/npc/normal/customizations_npc.png)',
154+
};
155+
}
148156
return {
149-
background: 'url(/static/npc/normal/customizations_background.png)',
150-
npc: 'url(/static/npc/normal/customizations_npc.png)',
157+
background: `url(/static/npc/${currentEvent.season}/customizations_background.png)`,
158+
npc: `url(/static/npc/${currentEvent.season}/customizations_npc.png)`,
151159
};
152160
},
153161
categories () {

website/client/src/components/shops/seasonal/index.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ export default {
480480
});
481481

482482
await this.triggerGetWorldState();
483-
this.currentEvent = _find(this.currentEventList, event => Boolean(['winter', 'spring', 'summer', 'fall'].includes(event.season)));
483+
this.currentEvent = _find(this.currentEventList, event => Boolean(event.season));
484484
this.imageURLs.background = `url(/static/npc/${this.currentEvent.season}/seasonal_shop_opened_background.png)`;
485485
this.imageURLs.npc = `url(/static/npc/${this.currentEvent.season}/seasonal_shop_opened_npc.png)`;
486486
},

website/common/script/content/constants/events.js

+2
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ export const REPEATING_EVENTS = {
8080
start: new Date('1970-10-30T08:00-05:00'),
8181
end: new Date('1970-11-01T23:59-05:00'),
8282
foodSeason: 'Candy',
83+
season: 'habitoween',
84+
npcImageSuffix: '_halloween',
8385
},
8486
harvestFeast: {
8587
start: new Date('1970-11-22T08:00-05:00'),

website/common/script/content/constants/schedule.js

+4
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,7 @@ export function assembleScheduledMatchers (date) {
844844
const gala = GALA_SCHEDULE[getGalaIndex(date)];
845845
const galaMatchers = gala.matchers;
846846
galaMatchers.forEach(matcher => {
847+
matcher.startMonth = gala.startMonth;
847848
matcher.endMonth = gala.endMonth;
848849
});
849850
items.push(...galaMatchers);
@@ -887,6 +888,9 @@ function makeEndDate (checkedDate, matcher) {
887888
end.minute(0);
888889
end.second(0);
889890
if (matcher.endMonth !== undefined) {
891+
if (matcher.startMonth && matcher.startMonth > matcher.endMonth) {
892+
end.year(checkedDate.getFullYear() + 1);
893+
}
890894
end.month(matcher.endMonth);
891895
} else if (end.date() <= checkedDate.getDate()) {
892896
end = moment(end).add(1, 'months');

website/common/script/content/gear/sets/special/index.js

+15-33
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ const armor = {
149149
notes: t('armorSpecialYetiNotes', { con: 9 }),
150150
con: 9,
151151
value: 90,
152+
season: 'winter',
152153
},
153154
ski: {
154155
specialClass: 'rogue',
@@ -157,6 +158,7 @@ const armor = {
157158
notes: t('armorSpecialSkiNotes', { per: 15 }),
158159
per: 15,
159160
value: 90,
161+
season: 'winter',
160162
},
161163
candycane: {
162164
specialClass: 'wizard',
@@ -165,6 +167,7 @@ const armor = {
165167
notes: t('armorSpecialCandycaneNotes', { int: 9 }),
166168
int: 9,
167169
value: 90,
170+
season: 'winter',
168171
},
169172
snowflake: {
170173
specialClass: 'healer',
@@ -173,6 +176,7 @@ const armor = {
173176
notes: t('armorSpecialSnowflakeNotes', { con: 15 }),
174177
con: 15,
175178
value: 90,
179+
season: 'winter',
176180
},
177181
birthday: {
178182
event: EVENTS.birthday,
@@ -182,51 +186,39 @@ const armor = {
182186
},
183187
springRogue: {
184188
set: 'stealthyKittySet',
185-
season: 'spring',
186189
},
187190
springWarrior: {
188191
set: 'mightyBunnySet',
189-
season: 'spring',
190192
},
191193
springMage: {
192194
set: 'magicMouseSet',
193-
season: 'spring',
194195
},
195196
springHealer: {
196197
set: 'lovingPupSet',
197-
season: 'spring',
198198
},
199199
summerRogue: {
200200
set: 'roguishPirateSet',
201-
season: 'summer',
202201
},
203202
summerWarrior: {
204203
set: 'daringSwashbucklerSet',
205-
season: 'summer',
206204
},
207205
summerMage: {
208206
set: 'emeraldMermageSet',
209-
season: 'summer',
210207
},
211208
summerHealer: {
212209
set: 'reefSeahealerSet',
213-
season: 'summer',
214210
},
215211
fallRogue: {
216212
set: 'vampireSmiterSet',
217-
season: 'fall',
218213
},
219214
fallWarrior: {
220215
set: 'monsterOfScienceSet',
221-
season: 'fall',
222216
},
223217
fallMage: {
224218
set: 'witchyWizardSet',
225-
season: 'fall',
226219
},
227220
fallHealer: {
228221
set: 'mummyMedicSet',
229-
season: 'fall',
230222
},
231223
winter2015Rogue: {
232224
set: 'icicleDrakeSet',
@@ -1228,6 +1220,7 @@ const head = {
12281220
notes: t('headSpecialYetiNotes', { str: 9 }),
12291221
str: 9,
12301222
value: 60,
1223+
season: 'winter',
12311224
},
12321225
ski: {
12331226
specialClass: 'rogue',
@@ -1236,6 +1229,7 @@ const head = {
12361229
notes: t('headSpecialSkiNotes', { per: 9 }),
12371230
per: 9,
12381231
value: 60,
1232+
season: 'winter',
12391233
},
12401234
candycane: {
12411235
specialClass: 'wizard',
@@ -1244,6 +1238,7 @@ const head = {
12441238
notes: t('headSpecialCandycaneNotes', { per: 7 }),
12451239
per: 7,
12461240
value: 60,
1241+
season: 'winter',
12471242
},
12481243
snowflake: {
12491244
specialClass: 'healer',
@@ -1252,54 +1247,43 @@ const head = {
12521247
notes: t('headSpecialSnowflakeNotes', { int: 7 }),
12531248
int: 7,
12541249
value: 60,
1250+
season: 'winter',
12551251
},
12561252
springRogue: {
12571253
set: 'stealthyKittySet',
1258-
season: 'spring',
12591254
},
12601255
springWarrior: {
12611256
set: 'mightyBunnySet',
1262-
season: 'spring',
12631257
},
12641258
springMage: {
12651259
set: 'magicMouseSet',
1266-
season: 'spring',
12671260
},
12681261
springHealer: {
12691262
set: 'lovingPupSet',
1270-
season: 'spring',
12711263
},
12721264
summerRogue: {
12731265
set: 'roguishPirateSet',
1274-
season: 'summer',
12751266
},
12761267
summerWarrior: {
12771268
set: 'daringSwashbucklerSet',
1278-
season: 'summer',
12791269
},
12801270
summerMage: {
12811271
set: 'emeraldMermageSet',
1282-
season: 'summer',
12831272
},
12841273
summerHealer: {
12851274
set: 'reefSeahealerSet',
1286-
season: 'summer',
12871275
},
12881276
fallRogue: {
12891277
set: 'vampireSmiterSet',
1290-
season: 'fall',
12911278
},
12921279
fallWarrior: {
12931280
set: 'monsterOfScienceSet',
1294-
season: 'fall',
12951281
},
12961282
fallMage: {
12971283
set: 'witchyWizardSet',
1298-
season: 'fall',
12991284
},
13001285
fallHealer: {
13011286
set: 'mummyMedicSet',
1302-
season: 'fall',
13031287
},
13041288
winter2015Rogue: {
13051289
set: 'icicleDrakeSet',
@@ -2114,6 +2098,7 @@ const shield = {
21142098
notes: t('shieldSpecialYetiNotes', { con: 7 }),
21152099
con: 7,
21162100
value: 70,
2101+
season: 'winter',
21172102
},
21182103
ski: {
21192104
specialClass: 'rogue',
@@ -2122,6 +2107,7 @@ const shield = {
21222107
notes: t('weaponSpecialSkiNotes', { str: 8 }),
21232108
str: 8,
21242109
value: 90,
2110+
season: 'winter',
21252111
},
21262112
snowflake: {
21272113
specialClass: 'healer',
@@ -2130,42 +2116,34 @@ const shield = {
21302116
notes: t('shieldSpecialSnowflakeNotes', { con: 9 }),
21312117
con: 9,
21322118
value: 70,
2119+
season: 'winter',
21332120
},
21342121
springRogue: {
21352122
set: 'stealthyKittySet',
2136-
season: 'spring',
21372123
},
21382124
springWarrior: {
21392125
set: 'mightyBunnySet',
2140-
season: 'spring',
21412126
},
21422127
springHealer: {
21432128
set: 'lovingPupSet',
2144-
season: 'spring',
21452129
},
21462130
summerRogue: {
21472131
set: 'roguishPirateSet',
2148-
season: 'summer',
21492132
},
21502133
summerWarrior: {
21512134
set: 'daringSwashbucklerSet',
2152-
season: 'summer',
21532135
},
21542136
summerHealer: {
21552137
set: 'reefSeahealerSet',
2156-
season: 'summer',
21572138
},
21582139
fallRogue: {
21592140
set: 'vampireSmiterSet',
2160-
season: 'fall',
21612141
},
21622142
fallWarrior: {
21632143
set: 'monsterOfScienceSet',
2164-
season: 'fall',
21652144
},
21662145
fallHealer: {
21672146
set: 'mummyMedicSet',
2168-
season: 'fall',
21692147
},
21702148
winter2015Rogue: {
21712149
set: 'icicleDrakeSet',
@@ -2665,6 +2643,7 @@ const weapon = {
26652643
notes: t('weaponSpecialYetiNotes', { str: 15 }),
26662644
str: 15,
26672645
value: 90,
2646+
season: 'winter',
26682647
},
26692648
ski: {
26702649
specialClass: 'rogue',
@@ -2673,6 +2652,7 @@ const weapon = {
26732652
notes: t('weaponSpecialSkiNotes', { str: 8 }),
26742653
str: 8,
26752654
value: 90,
2655+
season: 'winter',
26762656
},
26772657
candycane: {
26782658
specialClass: 'wizard',
@@ -2683,6 +2663,7 @@ const weapon = {
26832663
int: 15,
26842664
per: 7,
26852665
value: 160,
2666+
season: 'winter',
26862667
},
26872668
snowflake: {
26882669
specialClass: 'healer',
@@ -2691,6 +2672,7 @@ const weapon = {
26912672
notes: t('weaponSpecialSnowflakeNotes', { int: 9 }),
26922673
int: 9,
26932674
value: 90,
2675+
season: 'winter',
26942676
},
26952677
springRogue: {
26962678
set: 'stealthyKittySet',

website/server/controllers/api-v3/world.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ api.getWorldState = {
3535
}
3636

3737
worldState.currentEventList.forEach(event => {
38-
if (event.npcImageSuffix) {
38+
if (event.npcImageSuffix && !worldState.npcImageSuffix) {
3939
worldState.npcImageSuffix = event.npcImageSuffix;
4040
}
4141
});

0 commit comments

Comments
 (0)