mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-07 01:23:52 +00:00
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).
This commit is contained in:
parent
a0480dc3a2
commit
9309e62ab9
1 changed files with 10 additions and 0 deletions
|
|
@ -248,11 +248,21 @@ bool SQLExporter::exportQuests(const std::vector<Quest>& 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` "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue