Skip to content

Commit

Permalink
Update banner
Browse files Browse the repository at this point in the history
  • Loading branch information
MadeBaruna committed Sep 17, 2024
1 parent 35c69cf commit bb38cff
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 4 deletions.
20 changes: 20 additions & 0 deletions src/data/banners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,16 @@ export const banners: { [key: number]: Banner } = {
featuredRare: ['kachina', 'xinyan', 'bennett'],
timezoneDependent: true,
},
300071: {
name: 'Seeker of Flame-Wrought Secrets',
image: 1,
shortName: 'Kinich',
start: '2024-09-17 18:00:00',
end: '2024-10-08 14:59:00',
color: '#53dcb9',
featured: ['kinich', 'raiden_shogun'],
featuredRare: ['thoma', 'kujou_sara', 'chevreuse'],
},

400001: {
name: 'Epitome Invocation',
Expand Down Expand Up @@ -1590,6 +1600,16 @@ export const banners: { [key: number]: Banner } = {
],
timezoneDependent: true,
},
400070: {
name: 'Epitome Invocation',
image: 70,
shortName: 'Mountain King',
start: '2024-09-17 18:00:00',
end: '2024-10-08 14:59:00',
color: '#eae5e1',
featured: ['fang_of_the_mountain_king', 'engulfing_lightning'],
featuredRare: ['sacrificial_sword', 'rainslasher', 'favonius_lance', 'the_widsith', 'sacrificial_bow'],
},

500001: {
name: 'Ode to the Dawn Breeze',
Expand Down
43 changes: 43 additions & 0 deletions src/migrations/1726588161035-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: 'Seeker of Flame-Wrought Secrets',
start: '2024-09-17 18:00:00',
end: '2024-10-08 14:59:00',
id: 300071,
},
weapons: {
name: 'Epitome Invocation',
start: '2024-09-17 18:00:00',
end: '2024-10-08 14:59:00',
id: 400070,
},
};

export class UpdateBanner1726588161035 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, [300071, 400070]);
}
}
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 = 300070;
const LATEST_WEAPON_BANNER = 400069;
const LATEST_CHARACTER_BANNER = 300071;
const LATEST_WEAPON_BANNER = 400070;
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 = 300070;
const LATEST_WEAPON_BANNER = 400069;
const LATEST_CHARACTER_BANNER = 300071;
const LATEST_WEAPON_BANNER = 400070;

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

0 comments on commit bb38cff

Please sign in to comment.