mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 03:31:08 +00:00
[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:
@@ -9842,6 +9842,19 @@ Expedition* Client::CreateExpedition(
|
||||
return Expedition::TryCreate(this, dz, disable_messages);
|
||||
}
|
||||
|
||||
Expedition* Client::CreateExpeditionFromTemplate(uint32_t dz_template_id)
|
||||
{
|
||||
Expedition* expedition = nullptr;
|
||||
auto it = zone->dz_template_cache.find(dz_template_id);
|
||||
if (it != zone->dz_template_cache.end())
|
||||
{
|
||||
DynamicZone dz(DynamicZoneType::Expedition);
|
||||
dz.LoadTemplate(it->second);
|
||||
expedition = Expedition::TryCreate(this, dz, false);
|
||||
}
|
||||
return expedition;
|
||||
}
|
||||
|
||||
void Client::CreateTaskDynamicZone(int task_id, DynamicZone& dz_request)
|
||||
{
|
||||
if (task_state)
|
||||
@@ -11332,6 +11345,9 @@ void Client::SendReloadCommandMessages() {
|
||||
).c_str()
|
||||
);
|
||||
|
||||
auto dztemplates_link = Saylink::Create("#reload dztemplates", false, "#reload dztemplates");
|
||||
Message(Chat::White, fmt::format("Usage: {} - Reloads Dynamic Zone Templates globally", dztemplates_link).c_str());
|
||||
|
||||
auto ground_spawns_link = Saylink::Create(
|
||||
"#reload ground_spawns",
|
||||
false,
|
||||
|
||||
Reference in New Issue
Block a user