Horizon Official Technical Documentation
Guild.hpp
Go to the documentation of this file.
1/***************************************************
2 * _ _ _ *
3 * | | | | (_) *
4 * | |_| | ___ _ __ _ _______ _ __ *
5 * | _ |/ _ \| '__| |_ / _ \| '_ \ *
6 * | | | | (_) | | | |/ / (_) | | | | *
7 * \_| |_/\___/|_| |_/___\___/|_| |_| *
8 ***************************************************
9 * This file is part of Horizon (c).
10 *
11 * Copyright (c) 2019 Sagun K. (sagunxp@gmail.com).
12 * Copyright (c) 2019 Horizon Dev Team.
13 *
14 * Base Author - Sagun K. (sagunxp@gmail.com)
15 *
16 * This library is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation, either version 3 of the License, or
19 * (at your option) any later version.
20 *
21 * This library is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this library. If not, see <http://www.gnu.org/licenses/>.
28 **************************************************/
29
30#ifndef HORIZON_MODELS_GUILD_GUILD_HPP
31#define HORIZON_MODELS_GUILD_GUILD_HPP
32
33#include "Core/Multithreading/LockedUnorderedMap.hpp"
34
35namespace Horizon
36{
37namespace Models
38{
39namespace Guild
40{
41class Guild
42{
43public:
44 Guild() { }
45 ~Guild() { }
46
47 /* ID */
48 uint32_t get_id() { return _id; }
49 void set_id(uint32_t id) { _id = id; }
50 /* Name */
51 const std::string &getGuildName() { return _name; }
52 void setGuildName(std::string const &name) { _name = name; }
53 /* Leader ID */
54 uint32_t getLeaderID() { return _leader_id; }
55 void setLeaderID(uint32_t id) { _leader_id = id; }
56 /* Guild Level */
57 uint8_t getGuildLevel() { return _guild_lv; }
58 void setGuildLevel(uint8_t level) { _guild_level = level; }
59 /* Member Limit */
60 uint8_t getMemberLimit() { return _member_limit; }
61 void setMemberLimit(uint8_t limit) { _member_limit = limit; }
62 /* Member Level Average */
64 void setMemberLevelAverage(uint16_t average) { _member_level_average = average; }
65 /* Total Experience */
67 void setTotalExperience(uint64_t exp) { _total_experience = exp; }
68 /* Required Experience to the next level */
70 void setNextRequiredExperience(uint64_t exp) { _required_experience = exp; }
71 /* Skill Points */
72 uint16_t get_skill_points() { return _skill_points; }
73 void set_skill_points(uint16_t skill_points) { _skill_points = skill_points; }
74 /* Notice Title */
75 std::string &getNoticeTitle() { return _notice_title; }
76 void setNoticeTitle(std::string const &title) { _notice_title = title; }
77 /* Notice Content */
78 std::string &getNoticeContent() { return _notice_content; }
79 void setNoticeContent(std::string const &content) { _notice_content = content; }
80 /* Emblem Data Size */
81 uint32_t getEmblemDataSize() { return _emblem_data_size; }
82 void setEmblemDataSize(uint32_t size) { return _emblem_data_size; }
83 /* Emblem Version */
84 uint32_t getEmblemVersion() { return _emblem_version; }
85 void setEmblemVersion(uint32_t version) { _emblem_version = version; }
86
87private:
88 uint32_t _id;
89 std::string _name;
90 uint32_t _leader_id;
91 uint8_t _guild_level;
96 uint16_t _skill_points;
97 std::string _notice_title;
98 std::string _notice_content;
101
102 /* Relations */
103 std::unordered_map<uint32_t, Affiliation> _affiliations;
104 std::unordered_map<std::string, HLog> _expulsion_log;
105 std::unordered_map<uint32_t, Member> _members;
106 std::unordered_map<uint8_t, Position> _positions;
107 std::unordered_map<uint32_t, Skill> _skills;
108}
109}
110}
111}
112
113#endif /* HORIZON_MODELS_GUILD_GUILD_HPP */
Definition: Guild.hpp:42
std::unordered_map< uint8_t, Position > _positions
Definition: Guild.hpp:106
uint8_t _guild_level
Definition: Guild.hpp:91
void setGuildName(std::string const &name)
Definition: Guild.hpp:52
void setEmblemVersion(uint32_t version)
Definition: Guild.hpp:85
std::string _name
Definition: Guild.hpp:89
std::string _notice_title
Definition: Guild.hpp:97
void set_id(uint32_t id)
Definition: Guild.hpp:49
uint16_t _skill_points
Definition: Guild.hpp:96
std::unordered_map< std::string, HLog > _expulsion_log
Definition: Guild.hpp:104
void setTotalExperience(uint64_t exp)
Definition: Guild.hpp:67
uint8_t getMemberLimit()
Definition: Guild.hpp:60
std::string & getNoticeTitle()
Definition: Guild.hpp:75
void setNextRequiredExperience(uint64_t exp)
Definition: Guild.hpp:70
std::unordered_map< uint32_t, Skill > _skills
Definition: Guild.hpp:107
std::string & getNoticeContent()
Definition: Guild.hpp:78
uint16_t get_skill_points()
Definition: Guild.hpp:72
void setNoticeTitle(std::string const &title)
Definition: Guild.hpp:76
std::string _notice_content
Definition: Guild.hpp:98
uint8_t _member_limit
Definition: Guild.hpp:92
uint64_t getTotalExperience()
Definition: Guild.hpp:66
uint32_t _emblem_version
Definition: Guild.hpp:100
std::unordered_map< uint32_t, Member > _members
Definition: Guild.hpp:105
uint32_t _leader_id
Definition: Guild.hpp:90
uint8_t getGuildLevel()
Definition: Guild.hpp:57
uint16_t _member_level_average
Definition: Guild.hpp:93
void set_skill_points(uint16_t skill_points)
Definition: Guild.hpp:73
void setMemberLimit(uint8_t limit)
Definition: Guild.hpp:61
uint64_t _required_experience
Definition: Guild.hpp:95
uint64_t _total_experience
Definition: Guild.hpp:94
void setEmblemDataSize(uint32_t size)
Definition: Guild.hpp:82
uint64_t getNextRequiredExperience()
Definition: Guild.hpp:69
void setNoticeContent(std::string const &content)
Definition: Guild.hpp:79
void setMemberLevelAverage(uint16_t average)
Definition: Guild.hpp:64
uint16_t getMemberLevelAverage()
Definition: Guild.hpp:63
void setGuildLevel(uint8_t level)
Definition: Guild.hpp:58
uint32_t get_id()
Definition: Guild.hpp:48
void setLeaderID(uint32_t id)
Definition: Guild.hpp:55
Guild()
Definition: Guild.hpp:44
const std::string & getGuildName()
Definition: Guild.hpp:51
std::unordered_map< uint32_t, Affiliation > _affiliations
Definition: Guild.hpp:103
uint32_t getEmblemDataSize()
Definition: Guild.hpp:81
uint32_t getEmblemVersion()
Definition: Guild.hpp:84
uint32_t getLeaderID()
Definition: Guild.hpp:54
~Guild()
Definition: Guild.hpp:45
uint32_t _emblem_data_size
Definition: Guild.hpp:99
uint32_t _id
Definition: Guild.hpp:88
Definition: Element.hpp:7