diff --git a/src/data/banners.ts b/src/data/banners.ts index 3d4d98d..0dd1500 100644 --- a/src/data/banners.ts +++ b/src/data/banners.ts @@ -638,6 +638,17 @@ export const banners: { [key: number]: Banner } = { featured: ['raiden_shogun', 'yoimiya'], featuredRare: ['bennett', 'kujou_sara', 'chevreuse'], }, + 300060: { + name: 'The Crane Soars Skyward', + image: 1, + shortName: 'Xianyun', + start: '2024-01-31 06:00:00', + end: '2024-02-20 17:59:00', + color: '#affcd1', + featured: ['xianyun', 'nahida'], + featuredRare: ['gaming', 'faruzan', 'noelle'], + timezoneDependent: true, + }, 400001: { name: 'Epitome Invocation', @@ -1340,4 +1351,21 @@ export const banners: { [key: number]: Banner } = { featured: ['engulfing_lightning', 'thundering_pulse'], featuredRare: ['wavebreakers_fin', 'favonius_sword', 'rainslasher', 'eye_of_perception', 'rust'], }, + 400059: { + name: 'Epitome Invocation', + image: 60, + shortName: 'Crane', + start: '2024-01-31 06:00:00', + end: '2024-02-20 17:59:00', + color: '#ffb169', + featured: ['cranes_echoing_call', 'a_thousand_floating_dreams'], + featuredRare: [ + 'lithic_spear', + 'sacrificial_sword', + 'sacrificial_greatsword', + 'sacrificial_fragments', + 'sacrificial_bow', + ], + timezoneDependent: true, + }, }; diff --git a/src/migrations/1706674843762-UpdateBanner.ts b/src/migrations/1706674843762-UpdateBanner.ts new file mode 100644 index 0000000..7228e8c --- /dev/null +++ b/src/migrations/1706674843762-UpdateBanner.ts @@ -0,0 +1,43 @@ +import { MigrationInterface, QueryRunner } from 'typeorm'; +import { Banner } from '../entities/banner'; + +const banners = { + characters: { + name: 'The Crane Soars Skyward', + start: '2024-01-31 06:00:00', + end: '2024-02-20 17:59:00', + id: 300060, + }, + weapons: { + name: 'Epitome Invocation', + start: '2024-01-31 06:00:00', + end: '2024-02-20 17:59:00', + id: 400059, + }, +}; + +export class UpdateBanner1706674843762 implements MigrationInterface { + public async up(queryRunner: QueryRunner): Promise { + 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 { + await queryRunner.manager.delete(Banner, [300060, 400059]); + } +} diff --git a/src/queue/tally.ts b/src/queue/tally.ts index 8031d9d..435d9ae 100644 --- a/src/queue/tally.ts +++ b/src/queue/tally.ts @@ -306,8 +306,8 @@ async function calculateWishTally(job: Job): Promise { calculated[id] = result; } -const LATEST_CHARACTER_BANNER = 300059; -const LATEST_WEAPON_BANNER = 400058; +const LATEST_CHARACTER_BANNER = 300060; +const LATEST_WEAPON_BANNER = 400059; const TOTAL_BANNER = LATEST_CHARACTER_BANNER - 300009; // eslint-disable-next-line @typescript-eslint/no-unused-vars diff --git a/src/routes/wish.ts b/src/routes/wish.ts index 86223a9..187f134 100644 --- a/src/routes/wish.ts +++ b/src/routes/wish.ts @@ -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 = 300059; -const LATEST_WEAPON_BANNER = 400058; +const LATEST_CHARACTER_BANNER = 300060; +const LATEST_WEAPON_BANNER = 400059; export default async function (server: FastifyInstance): Promise { server.get(