[Expeditions] Store description and leader name on dz (#1294)

* Rename dynamic zone source files

* Store description and leader name on dz

Removes the DynamicZoneInfo struct used for switch list window. This
data can be stored on DynamicZone and kept updated by its owning system

* Separate create compass packet method

Cleanup MarkSingleCompassLoc
This commit is contained in:
hg
2021-03-16 01:00:55 -04:00
committed by GitHub
parent b3fbe1b015
commit 0d12bf0b1f
11 changed files with 91 additions and 87 deletions
+4 -3
View File
@@ -21,7 +21,7 @@
#ifndef EXPEDITION_H
#define EXPEDITION_H
#include "dynamiczone.h"
#include "dynamic_zone.h"
#include "expedition_lockout_timer.h"
#include "../common/eq_constants.h"
#include <cstdint>
@@ -76,7 +76,7 @@ class Expedition
{
public:
Expedition() = delete;
Expedition(uint32_t id, const std::string& uuid, const DynamicZone& dz, const std::string& expedition_name,
Expedition(uint32_t id, const std::string& uuid, DynamicZone&& dz, const std::string& expedition_name,
const ExpeditionMember& leader, uint32_t min_players, uint32_t max_players);
static Expedition* TryCreate(Client* requester, DynamicZone& dynamiczone, ExpeditionRequest& request);
@@ -111,7 +111,7 @@ public:
uint32_t GetMinPlayers() const { return m_min_players; }
uint32_t GetMaxPlayers() const { return m_max_players; }
uint32_t GetMemberCount() const { return static_cast<uint32_t>(m_members.size()); }
const DynamicZone& GetDynamicZone() const { return m_dynamiczone; }
DynamicZone& GetDynamicZone() { return m_dynamiczone; }
const std::string& GetName() const { return m_expedition_name; }
const std::string& GetLeaderName() const { return m_leader.name; }
const std::string& GetUUID() const { return m_uuid; }
@@ -209,6 +209,7 @@ private:
const std::string& add_char_name, uint32_t add_char_id);
void SendWorldSetSecondsRemaining(uint32_t seconds_remaining);
void SendWorldSettingChanged(uint16_t server_opcode, bool setting_value);
void SetDynamicZone(DynamicZone&& dz);
void TryAddClient(Client* add_client, const std::string& inviter_name,
const std::string& swap_remove_name, Client* leader_client = nullptr);
void UpdateDzDuration(uint32_t new_duration) { m_dynamiczone.SetUpdatedDuration(new_duration); }