[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
+4
View File
@@ -2,6 +2,7 @@
#define WORLD_DYNAMIC_ZONE_MANAGER_H
#include "../common/timer.h"
#include "../common/repositories/dynamic_zone_templates_repository.h"
#include <memory>
#include <unordered_map>
#include <vector>
@@ -20,13 +21,16 @@ public:
void CacheAllFromDatabase();
void CacheNewDynamicZone(ServerPacket* pack);
DynamicZone* CreateNew(DynamicZone& dz_request, const std::vector<DynamicZoneMember>& members);
void LoadTemplates();
void Process();
void PurgeExpiredDynamicZones();
const auto& GetTemplates() const { return m_dz_templates; }
std::unordered_map<uint32_t, std::unique_ptr<DynamicZone>> dynamic_zone_cache;
private:
Timer m_process_throttle_timer{};
std::unordered_map<uint32_t, DynamicZoneTemplatesRepository::DynamicZoneTemplates> m_dz_templates;
};
#endif