Skip to content

Commit

Permalink
Update banners
Browse files Browse the repository at this point in the history
  • Loading branch information
MadeBaruna committed Dec 10, 2024
1 parent 85c102d commit f51fffa
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 4 deletions.
26 changes: 26 additions & 0 deletions src/data/banners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,16 @@ export const banners: { [key: number]: Banner } = {
featuredRare: ['ororon', 'sucrose', 'barbara'],
timezoneDependent: true,
},
300075: {
name: 'Decree of the Deeps',
image: 3,
shortName: 'Neuvillette',
start: '2024-12-10 18:00:00',
end: '2024-12-31 14:59:00',
color: '#72fefd',
featured: ['neuvillette', 'zhongli'],
featuredRare: ['shikanoin_heizou', 'fischl', 'yaoyao'],
},

400001: {
name: 'Epitome Invocation',
Expand Down Expand Up @@ -1673,6 +1683,22 @@ export const banners: { [key: number]: Banner } = {
featured: ['astral_vultures_crimson_plumage', 'the_first_great_magic'],
featuredRare: ['waveriding_whirl', 'flower-wreathed_feathers', 'the_flute', 'the_bell', 'favonius_lance'],
},
400074: {
name: 'Epitome Invocation',
image: 74,
shortName: 'Tome',
start: '2024-12-10 18:00:00',
end: '2024-12-31 14:59:00',
color: '#eae5e1',
featured: ['tome_of_the_eternal_flow', 'vortex_vanquisher'],
featuredRare: [
'mitternachts_waltz',
'favonius_sword',
'favonius_greatsword',
'dragons_bane',
'sacrificial_fragments',
],
},

500001: {
name: 'Ode to the Dawn Breeze',
Expand Down
43 changes: 43 additions & 0 deletions src/migrations/1733815438034-UpdateBanner.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
import { Banner } from '../entities/banner';

const banners = {
characters: {
name: "Piercing Shot's Crimson Wake",
start: '2024-12-10 18:00:00',
end: '2024-12-31 14:59:00',
id: 300075,
},
weapons: {
name: 'Epitome Invocation',
start: '2024-12-10 18:00:00',
end: '2024-12-31 14:59:00',
id: 400074,
},
};

export class UpdateBanner1733815438034 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
const newCharacterBanner = banners.characters;
const characterBanner = new Banner();
characterBanner.id = newCharacterBanner.id;
characterBanner.type = 'characters';
characterBanner.name = newCharacterBanner.name;
characterBanner.start = `${newCharacterBanner.start}+8`;
characterBanner.end = `${newCharacterBanner.end}+8`;

const newWeaponBanner = banners.weapons;
const weaponBanner = new Banner();
weaponBanner.id = newWeaponBanner.id;
weaponBanner.type = 'weapons';
weaponBanner.name = newWeaponBanner.name;
weaponBanner.start = `${newWeaponBanner.start}+8`;
weaponBanner.end = `${newWeaponBanner.end}+8`;

await queryRunner.manager.save([characterBanner, weaponBanner]);
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.manager.delete(Banner, [300074, 400073]);
}
}
4 changes: 2 additions & 2 deletions src/queue/tally.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ async function calculateWishTally(job: Job<number>): Promise<void> {
calculated[id] = result;
}

const LATEST_CHARACTER_BANNER = 300074;
const LATEST_WEAPON_BANNER = 400073;
const LATEST_CHARACTER_BANNER = 300075;
const LATEST_WEAPON_BANNER = 400074;
const LATEST_CHRONICLED_BANNER = 500001;
const TOTAL_BANNER = LATEST_CHARACTER_BANNER - 300009;

Expand Down
4 changes: 2 additions & 2 deletions src/routes/wish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import { WishSummaryRequest } from '../types/wishSummaryRequest';
import { WishSummaryLuckRequest } from '../types/wishSummaryLuckRequest';
import { wishSummary, wishSummaryLuck4, wishSummaryLuck5, wishSummaryWinRateOff4, wishSummaryWinRateOff5 } from '../stores/wishSummary';

const LATEST_CHARACTER_BANNER = 300074;
const LATEST_WEAPON_BANNER = 400073;
const LATEST_CHARACTER_BANNER = 300075;
const LATEST_WEAPON_BANNER = 400074;

export default async function (server: FastifyInstance): Promise<void> {
server.get(
Expand Down

0 comments on commit f51fffa

Please sign in to comment.