- {/* Active quests */}
+ {/* Active story quests */}
- Quêtes actives ({activeCount}/3)
+ Quêtes actives ({activeStory.length}/3)
- {active && active.length > 0 ? (
+ {activeStory.length > 0 ? (
- {active.map((pq: any) => )}
+ {activeStory.map((pq: any) => )}
) : (
- Aucune quête active — acceptez-en dans le panneau de droite
+ Aucune quête active — acceptez-en à droite
)}
- {/* Available quests */}
+ {/* Available story quests */}
Quêtes disponibles
- {available && available.length > 0 ? (
+ {availableStory.length > 0 ? (
- {available.map((q: any) => )}
+ {availableStory.map((q: any) => )}
) : (
@@ -208,6 +212,17 @@ export function QuestPage() {
+ {/* Tâches quotidiennes (répétables — toujours en fond) */}
+
+
+ 🔄 Tâches quotidiennes
+
+
+ {activeDaily.map((pq: any) => )}
+ {availableDaily.map((q: any) => )}
+
+
+
{/* Arcs narratifs */}
{arcs && arcs.length > 0 && (
diff --git a/src/quest/quest.service.ts b/src/quest/quest.service.ts
index 0241e04..7ee4168 100644
--- a/src/quest/quest.service.ts
+++ b/src/quest/quest.service.ts
@@ -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