Skip to content

Commit

Permalink
Update banner
Browse files Browse the repository at this point in the history
  • Loading branch information
MadeBaruna committed Jun 5, 2024
1 parent 6553db4 commit e5a3033
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 4 deletions.
22 changes: 22 additions & 0 deletions src/data/banners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,17 @@ export const banners: { [key: number]: Banner } = {
featured: ['wanderer', 'baizhu'],
featuredRare: ['layla', 'faruzan', 'beidou'],
},
300066: {
name: 'Illuminating Lightning',
image: 1,
shortName: 'Clorinde',
start: '2024-06-05 06:00:00',
end: '2024-06-25 17:59:00',
color: '#6968ff',
featured: ['clorinde', 'alhaitham'],
featuredRare: ['sethos', 'bennett', 'thoma'],
timezoneDependent: true,
},

400001: {
name: 'Epitome Invocation',
Expand Down Expand Up @@ -1478,6 +1489,17 @@ export const banners: { [key: number]: Banner } = {
featured: ['tulaytullahs_remembrance', 'jadefalls_splendor'],
featuredRare: ['prospectors_drill', 'range_gauge', 'favonius_sword', 'rainslasher', 'sacrificial_fragments'],
},
400065: {
name: 'Epitome Invocation',
image: 65,
shortName: 'Absolution',
start: '2024-06-05 06:00:00',
end: '2024-06-25 17:59:00',
color: '#ffb169',
featured: ['absolution', 'light_of_foliar_incision'],
featuredRare: ['lithic_spear', 'sacrificial_sword', 'sacrificial_greatsword', 'the_widsith', 'the_stringless'],
timezoneDependent: true,
},

500001: {
name: 'Ode to the Dawn Breeze',
Expand Down
43 changes: 43 additions & 0 deletions src/migrations/1717568550511-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: 'Illuminating Lightning',
start: '2024-06-05 06:00:00',
end: '2024-06-25 17:59:00',
id: 300066,
},
weapons: {
name: 'Epitome Invocation',
start: '2024-06-05 06:00:00',
end: '2024-06-25 17:59:00',
id: 400065,
},
};

export class UpdateBanner1717568550511 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, [300066, 400065]);
}
}
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 = 300065;
const LATEST_WEAPON_BANNER = 400064;
const LATEST_CHARACTER_BANNER = 300066;
const LATEST_WEAPON_BANNER = 400065;
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 = 300065;
const LATEST_WEAPON_BANNER = 400064;
const LATEST_CHARACTER_BANNER = 300066;
const LATEST_WEAPON_BANNER = 400065;

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

0 comments on commit e5a3033

Please sign in to comment.