mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-07 17:43:51 +00:00
fix(sql): translate spawn.id to creature SQL entry for quest links
The editor stores quest hooks (questGiverNpcId, turnInNpcId, KillCreature targetName) as the spawner's per-spawn .id sequence. The SQL exporter writes creature_template entries as 'creatureStartEntry + index'. The two number spaces are different, so quest links pointed at non-existent creature entries. Added a spawn.id -> SQL entry map built from the spawns vector and used it in: - RequiredNpcOrGo[1..4] for KillCreature objectives - creature_queststarter / creature_questender
This commit is contained in:
parent
d258144df4
commit
446b0970dc
2 changed files with 32 additions and 7 deletions
|
|
@ -16,10 +16,16 @@ public:
|
|||
uint32_t mapId = 9000,
|
||||
uint32_t startEntry = 100000);
|
||||
|
||||
// Export quest definitions as AzerothCore quest_template SQL
|
||||
// Export quest definitions as AzerothCore quest_template SQL.
|
||||
// `spawns` is used to translate the editor's per-spawn .id values stored
|
||||
// in quest links (questGiverNpcId, turnInNpcId, KillCreature targetName)
|
||||
// into the matching SQL `entry` (which is `creatureStartEntry + index`).
|
||||
// Pass an empty spawns vector if no translation is needed.
|
||||
static bool exportQuests(const std::vector<Quest>& quests,
|
||||
const std::string& path,
|
||||
uint32_t startEntry = 100000);
|
||||
uint32_t startEntry = 100000,
|
||||
const std::vector<CreatureSpawn>* spawns = nullptr,
|
||||
uint32_t creatureStartEntry = 100000);
|
||||
|
||||
// Export everything to a single SQL file
|
||||
static bool exportAll(const std::vector<CreatureSpawn>& spawns,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue