feat: repeatable quests hors pool 3 slots + section tâches quotidiennes
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 32s

Répétables ne comptent plus dans le MAX_ACTIVE_QUESTS (3).
Frontend: section séparée "Tâches quotidiennes" en grille 3 colonnes,
quêtes narratives en haut avec les slots limités.
Prépare le terrain pour le hub village (forgeron, taverne, etc.).
This commit is contained in:
2026-03-24 16:57:57 +01:00
parent af247a1c6b
commit 9fac9e123b
2 changed files with 36 additions and 15 deletions

View File

@@ -83,12 +83,18 @@ export class QuestService {
throw new BadRequestException(`Niveau ${quest.minLevel} requis`);
}
// Check active quest count
const activeCount = await this.playerQuestRepo.count({
where: { characterId, status: 'active' },
});
if (activeCount >= MAX_ACTIVE_QUESTS) {
throw new BadRequestException(`Maximum ${MAX_ACTIVE_QUESTS} quêtes actives`);
// Check active quest count (repeatable quests don't count toward the limit)
if (!quest.repeatable) {
const activeNonRepeatable = await this.playerQuestRepo
.createQueryBuilder('pq')
.innerJoin('pq.quest', 'q')
.where('pq.character_id = :characterId', { characterId })
.andWhere('pq.status = :status', { status: 'active' })
.andWhere('q.repeatable = false')
.getCount();
if (activeNonRepeatable >= MAX_ACTIVE_QUESTS) {
throw new BadRequestException(`Maximum ${MAX_ACTIVE_QUESTS} quêtes actives (hors répétables)`);
}
}
// Check not already active