feat: 장수 관련 명령어 처리 및 설정 기능 추가

This commit is contained in:
2026-01-04 16:51:58 +00:00
parent ef2ced5f5e
commit 0e06ae9c38
9 changed files with 699 additions and 152 deletions
@@ -249,6 +249,7 @@ export const createDatabaseTurnHooks = async (
nations,
troops,
deletedTroops,
deletedGenerals,
diplomacy,
logs,
createdGenerals,
@@ -300,6 +301,12 @@ export const createDatabaseTurnHooks = async (
});
}
if (deletedGenerals.length > 0) {
await prisma.general.deleteMany({
where: { id: { in: deletedGenerals } },
});
}
await Promise.all([
...generals
.filter((general) => !createdIds.has(general.id))