Skip to content

Commit

Permalink
Update banners
Browse files Browse the repository at this point in the history
  • Loading branch information
MadeBaruna committed Oct 29, 2024
1 parent 2c7b167 commit 12a784f
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 @@ -775,6 +775,16 @@ export const banners: { [key: number]: Banner } = {
featuredRare: ['dori', 'candace', 'collei'],
timezoneDependent: true,
},
300073: {
name: "The Moongrass' Enlightenment",
image: 4,
shortName: 'Nahida',
start: '2024-10-29 18:00:00',
end: '2024-11-19 14:59:00',
color: '#b8db94',
featured: ['nahida', 'hu_tao'],
featuredRare: ['sethos', 'xingqiu', 'kuki_shinobu'],
},

400001: {
name: 'Epitome Invocation',
Expand Down Expand Up @@ -1632,6 +1642,16 @@ export const banners: { [key: number]: Banner } = {
featuredRare: ['sturdy_bone', 'mountain-bracing_bolt', 'sacrificial_greatsword', 'favonius_codex', 'rust'],
timezoneDependent: true,
},
400072: {
name: 'Epitome Invocation',
image: 72,
shortName: 'Dreams',
start: '2024-10-29 18:00:00',
end: '2024-11-19 14:59:00',
color: '#eae5e1',
featured: ['a_thousand_floating_dreams', 'staff_of_homa'],
featuredRare: ['fruitful_hook', 'lions_roar', 'dragons_bane', 'eye_of_perception', 'favonius_warbow'],
},

500001: {
name: 'Ode to the Dawn Breeze',
Expand Down
43 changes: 43 additions & 0 deletions src/migrations/1730198923145-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: "The Moongrass' Enlightenment",
start: '2024-10-29 18:00:00',
end: '2024-11-19 14:59:00',
id: 300073,
},
weapons: {
name: 'Epitome Invocation',
start: '2024-10-29 18:00:00',
end: '2024-11-19 14:59:00',
id: 400072,
},
};

export class UpdateBanner1730198923145 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, [300073, 400072]);
}
}
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 = 300072;
const LATEST_WEAPON_BANNER = 400071;
const LATEST_CHARACTER_BANNER = 300073;
const LATEST_WEAPON_BANNER = 400072;
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 = 300072;
const LATEST_WEAPON_BANNER = 400071;
const LATEST_CHARACTER_BANNER = 300073;
const LATEST_WEAPON_BANNER = 400072;

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

0 comments on commit 12a784f

Please sign in to comment.