mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-20 01:18:21 +00:00
[Expeditions] Store members on dynamic zone (#1358)
This moves members from expeditions so other systems can use them Replace expedition_members table with dynamic_zone_members Move 'EnableInDynamicZoneStatus' rule to DynamicZone namespace Modify #dz list to show dz members (not instance players) and type name Move various queries to repository methods
This commit is contained in:
@@ -3,10 +3,8 @@
|
||||
|
||||
#include "dynamic_zone_base.h"
|
||||
#include "repositories/expeditions_repository.h"
|
||||
#include "repositories/expedition_members_repository.h"
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class ExpeditionBase
|
||||
{
|
||||
@@ -19,38 +17,24 @@ public:
|
||||
|
||||
uint32_t GetID() const { return m_id; }
|
||||
uint32_t GetLeaderID() const { return m_leader.id; }
|
||||
uint32_t GetMemberCount() const { return static_cast<uint32_t>(m_members.size()); }
|
||||
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; }
|
||||
const std::vector<DynamicZoneMember>& GetMembers() const { return m_members; }
|
||||
|
||||
void AddInternalMember(const DynamicZoneMember& member);
|
||||
void ClearInternalMembers() { m_members.clear(); }
|
||||
bool HasMember(const std::string& character_name);
|
||||
bool HasMember(uint32_t character_id);
|
||||
bool IsEmpty() const { return m_members.empty(); }
|
||||
void RemoveInternalMember(uint32_t character_id);
|
||||
bool SetInternalMemberStatus(uint32_t character_id, DynamicZoneMemberStatus status);
|
||||
const DynamicZoneMember& GetLeader() const { return m_leader; }
|
||||
|
||||
void LoadRepositoryResult(ExpeditionsRepository::ExpeditionWithLeader&& entry);
|
||||
void AddMemberFromRepositoryResult(ExpeditionMembersRepository::MemberWithName&& entry);
|
||||
|
||||
protected:
|
||||
ExpeditionBase() = default;
|
||||
ExpeditionBase(uint32_t id, const std::string& uuid, const std::string& expedition_name,
|
||||
const DynamicZoneMember& leader);
|
||||
|
||||
DynamicZoneMember GetMemberData(uint32_t character_id);
|
||||
DynamicZoneMember GetMemberData(const std::string& character_name);
|
||||
|
||||
uint32_t m_id = 0;
|
||||
bool m_is_locked = false;
|
||||
bool m_add_replay_on_join = true;
|
||||
std::string m_uuid;
|
||||
std::string m_expedition_name;
|
||||
DynamicZoneMember m_leader;
|
||||
std::vector<DynamicZoneMember> m_members;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user