diff --git a/frontend/src/pages/QuestPage.tsx b/frontend/src/pages/QuestPage.tsx index 8acab72..0135291 100644 --- a/frontend/src/pages/QuestPage.tsx +++ b/frontend/src/pages/QuestPage.tsx @@ -214,25 +214,37 @@ export function QuestPage() { if (loadActive || loadAvail) return
- Quêtes actives ({activeStory.length}/3) + Quêtes actives ({activeCombat.length}/3)
- {activeStory.length > 0 ? ( + {activeCombat.length > 0 ? (- Quêtes disponibles + Quêtes de combat
- {availableStory.length > 0 ? ( + {shownCombat.length > 0 ? (+ 🔨 Métiers +
+diff --git a/src/quest/quest.service.ts b/src/quest/quest.service.ts index 232c9e2..03fd48f 100644 --- a/src/quest/quest.service.ts +++ b/src/quest/quest.service.ts @@ -92,17 +92,20 @@ export class QuestService { throw new BadRequestException(`Niveau ${quest.minLevel} requis`); } - // Check active quest count (repeatable quests don't count toward the limit) - if (!quest.repeatable) { - const activeNonRepeatable = await this.playerQuestRepo + // Check active quest count + // Repeatable + craft/forge quests don't count toward the 3-slot limit + const isCraftQuest = ['forge_item', 'craft_item'].includes(quest.objectiveType); + if (!quest.repeatable && !isCraftQuest) { + const activeCombat = 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') + .andWhere('q.objective_type NOT IN (:...types)', { types: ['forge_item', 'craft_item'] }) .getCount(); - if (activeNonRepeatable >= MAX_ACTIVE_QUESTS) { - throw new BadRequestException(`Maximum ${MAX_ACTIVE_QUESTS} quêtes actives (hors répétables)`); + if (activeCombat >= MAX_ACTIVE_QUESTS) { + throw new BadRequestException(`Maximum ${MAX_ACTIVE_QUESTS} quêtes de combat actives`); } }