feat: 메인 화면에 정식 기수 표시
This commit is contained in:
@@ -323,9 +323,6 @@ export const seedScenarioToDatabase = async (options: ScenarioSeedOptions): Prom
|
||||
options: install.autorunUser.options,
|
||||
};
|
||||
}
|
||||
const archivedWorldMeta = { ...worldMeta };
|
||||
delete archivedWorldMeta.hiddenSeed;
|
||||
|
||||
await connector.connect();
|
||||
try {
|
||||
const result: ScenarioSeedResult = { seed, warnings, applied: true };
|
||||
@@ -383,6 +380,20 @@ export const seedScenarioToDatabase = async (options: ScenarioSeedOptions): Prom
|
||||
await prisma.worldState.deleteMany();
|
||||
}
|
||||
|
||||
const serverId = typeof worldMeta.serverId === 'string' ? worldMeta.serverId : undefined;
|
||||
const completedGameCount = await prisma.gameHistory.count({
|
||||
where: {
|
||||
status: 'COMPLETED',
|
||||
...(serverId ? { serverId: { not: serverId } } : {}),
|
||||
},
|
||||
});
|
||||
// Ref fixes server_cnt once during ResetHelper initialization. Keep the
|
||||
// frequently rendered game index in the same persisted read model and
|
||||
// exclude abandoned or unfinished rows from the official sequence.
|
||||
worldMeta.gameIdx = completedGameCount + 1;
|
||||
const archivedWorldMeta = { ...worldMeta };
|
||||
delete archivedWorldMeta.hiddenSeed;
|
||||
|
||||
await prisma.worldState.create({
|
||||
data: {
|
||||
scenarioCode: String(options.scenarioId),
|
||||
|
||||
Reference in New Issue
Block a user