[Dynamic Zones] Implement dz templates (#2345)

This allows shared tasks to create dz instances automatically through
the `dz_template_id` field instead of using quest scripts. Quest apis
were also added to create expeditions from template ids.
This commit is contained in:
hg
2022-07-30 22:25:43 -04:00
committed by GitHub
parent 5e7e255d72
commit 53b599518a
26 changed files with 756 additions and 5 deletions
+10
View File
@@ -164,3 +164,13 @@ void DynamicZoneManager::Process()
fmt::format("id IN ({})", fmt::join(dynamic_zone_ids, ",")));
}
}
void DynamicZoneManager::LoadTemplates()
{
m_dz_templates.clear();
auto dz_templates = DynamicZoneTemplatesRepository::All(content_db);
for (const auto& dz_template : dz_templates)
{
m_dz_templates[dz_template.id] = dz_template;
}
}