mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
[Expeditions] Refactor expedition caching (#1315)
Add common expedition base class Use repository for zone and world expedition caching World now stores members and leader as Member objects instead of ids This improves readability of the caching methods and lets world cache expedition dzs and members like zone. World also now caches expeditions as unique_ptr which will be necessary for future dz callback lambdas that capture 'this' so addresses don't change on cache vector resizes.
This commit is contained in:
@@ -9,21 +9,6 @@
|
||||
|
||||
extern ZSList zoneserver_list;
|
||||
|
||||
DynamicZone::DynamicZone(
|
||||
uint32_t id, uint32_t zone_id, uint32_t instance_id, uint32_t zone_version,
|
||||
uint32_t start_time, uint32_t duration, DynamicZoneType type
|
||||
)
|
||||
{
|
||||
m_id = id;
|
||||
m_instance_id = instance_id;
|
||||
m_zone_id = zone_id;
|
||||
m_zone_version = zone_version;
|
||||
m_start_time = std::chrono::system_clock::from_time_t(start_time);
|
||||
m_duration = std::chrono::seconds(duration);
|
||||
m_type = type;
|
||||
m_expire_time = m_start_time + m_duration;
|
||||
}
|
||||
|
||||
Database& DynamicZone::GetDatabase()
|
||||
{
|
||||
return database;
|
||||
|
||||
Reference in New Issue
Block a user