2017-08-27 02:04:04 +02:00
|
|
|
#ifndef CORE_LINKSHELL_H
|
|
|
|
#define CORE_LINKSHELL_H
|
|
|
|
|
|
|
|
#include <Server_Common/Common.h>
|
|
|
|
#include <set>
|
|
|
|
|
|
|
|
namespace Core
|
|
|
|
{
|
|
|
|
|
|
|
|
class Linkshell
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
/*! unique ID of the linkshell */
|
2017-08-28 18:36:51 +02:00
|
|
|
uint64_t m_linkshellId;
|
2017-08-27 02:04:04 +02:00
|
|
|
/*! ID of the master character */
|
2017-08-28 18:36:51 +02:00
|
|
|
uint64_t m_masterCharacterId;
|
2017-08-27 02:04:04 +02:00
|
|
|
/*! ID list of all linkshell members */
|
2017-08-28 18:36:51 +02:00
|
|
|
std::set< uint64_t > m_memberIds;
|
2017-08-27 02:04:04 +02:00
|
|
|
/*! Name of the linkshell */
|
|
|
|
std::string m_name;
|
|
|
|
/*! List of member IDs with leader rank */
|
2017-08-28 18:36:51 +02:00
|
|
|
std::set< uint64_t > m_leaderIds;
|
2017-08-27 02:04:04 +02:00
|
|
|
/*! list of IDs of pending character invites */
|
2017-08-28 18:36:51 +02:00
|
|
|
std::set< uint64_t > m_inviteIds;
|
2017-08-27 02:04:04 +02:00
|
|
|
|
|
|
|
public:
|
2017-08-28 18:36:51 +02:00
|
|
|
Linkshell( uint64_t id,
|
2017-08-27 02:04:04 +02:00
|
|
|
const std::string& name,
|
2017-08-28 18:36:51 +02:00
|
|
|
uint64_t masterId,
|
|
|
|
const std::set< uint64_t >& members,
|
|
|
|
const std::set< uint64_t >& leaders,
|
|
|
|
const std::set< uint64_t >& invites );
|
2017-08-27 02:04:04 +02:00
|
|
|
|
2017-08-28 18:36:51 +02:00
|
|
|
uint64_t getId() const;
|
2017-08-27 02:04:04 +02:00
|
|
|
|
|
|
|
const std::string& getName() const;
|
|
|
|
|
2017-08-28 18:36:51 +02:00
|
|
|
uint64_t getMasterId() const;
|
2017-08-27 02:04:04 +02:00
|
|
|
|
2017-08-28 18:36:51 +02:00
|
|
|
const std::set< uint64_t >& getMemberIdList() const;
|
|
|
|
std::set< uint64_t >& getMemberIdList();
|
2017-08-27 02:04:04 +02:00
|
|
|
|
2017-08-28 18:36:51 +02:00
|
|
|
const std::set< uint64_t >& getLeaderIdList() const;
|
|
|
|
std::set< uint64_t >& getLeaderIdList();
|
2017-08-27 02:04:04 +02:00
|
|
|
|
2017-08-28 18:36:51 +02:00
|
|
|
const std::set< uint64_t >& getInviteIdList() const;
|
|
|
|
std::set< uint64_t >& getInviteIdList();
|
2017-08-27 02:04:04 +02:00
|
|
|
|
2017-08-28 18:36:51 +02:00
|
|
|
void addMember( uint64_t memberId );
|
|
|
|
void removeMember( uint64_t memberId );
|
2017-08-27 02:04:04 +02:00
|
|
|
|
2017-08-28 18:36:51 +02:00
|
|
|
void addLeader( uint64_t memberId );
|
|
|
|
void removeLeader( uint64_t memberId );
|
2017-08-27 02:04:04 +02:00
|
|
|
|
2017-08-28 18:36:51 +02:00
|
|
|
void addInvite( uint64_t memberId );
|
|
|
|
void removeInvite( uint64_t memberId );
|
2017-08-27 02:04:04 +02:00
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
#endif //SAPPHIRE_LINKSHELL_H
|