From 9309e62ab99d0628c04b80ae92a5c34b67142cf1 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Wed, 6 May 2026 09:44:23 -0700 Subject: [PATCH] feat(sql): emit RequiredNpcOrGo for TalkToNPC quest objectives Previously only KillCreature and CollectItem objectives translated to SQL. AzerothCore reuses RequiredNpcOrGo for talk objectives (count=1 indicates an interaction rather than a kill), so wire that through and add a comment about which objective types need server scripts (ExploreArea/EscortNPC/UseObject). --- tools/editor/sql_exporter.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/editor/sql_exporter.cpp b/tools/editor/sql_exporter.cpp index 94dc9919..2e0a5ea4 100644 --- a/tools/editor/sql_exporter.cpp +++ b/tools/editor/sql_exporter.cpp @@ -248,11 +248,21 @@ bool SQLExporter::exportQuests(const std::vector& quests, reqNpcOrGo[npcSlot] = resolveCreatureEntry(id); reqNpcOrGoCount[npcSlot] = obj.targetCount; npcSlot++; + } else if (obj.type == QuestObjectiveType::TalkToNPC && npcSlot < 4) { + // AzerothCore reuses RequiredNpcOrGo for talk objectives — + // count=1 indicates an interaction rather than a kill. + reqNpcOrGo[npcSlot] = resolveCreatureEntry(id); + reqNpcOrGoCount[npcSlot] = 1; + npcSlot++; } else if (obj.type == QuestObjectiveType::CollectItem && itemSlot < 6) { reqItemId[itemSlot] = id; reqItemCount[itemSlot] = obj.targetCount; itemSlot++; } + // ExploreArea / EscortNPC / UseObject have no direct + // quest_template column; they need server scripts. Silently + // skipped here (validateChains warns if a quest has no SQL- + // representable objectives). } f << "INSERT INTO `quest_template` "