TrinityCore
Loading...
Searching...
No Matches
Realm.h
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef Realm_h__
19#define Realm_h__
20
21#include "Common.h"
22#include "AsioHacksFwd.h"
23#include <compare>
24#include <memory>
25
38
40{
41 RealmHandle() : Realm(0) { }
42 RealmHandle(uint32 index) : Realm(index) { }
43
44 uint32 Realm; // primary key in `realmlist` table
45
46 std::strong_ordering operator<=>(RealmHandle const& r) const { return Realm <=> r.Realm; }
47};
48
51{
57
59
60 REALM_TYPE_FFA_PVP = 16 // custom, free for all pvp mode like arena PvP in all zones except rest activated places and sanctuaries
61 // replaced by REALM_PVP in realm list
62};
63
64// Storage object for a realm
66{
69 std::unique_ptr<boost::asio::ip::address> ExternalAddress;
70 std::unique_ptr<boost::asio::ip::address> LocalAddress;
71 std::unique_ptr<boost::asio::ip::address> LocalSubnetMask;
73 std::string Name;
79
80 boost::asio::ip::tcp_endpoint GetAddressForClient(boost::asio::ip::address const& clientAddr) const;
81};
82
83#endif // Realm_h__
AccountTypes
Definition Common.h:39
uint8_t uint8
Definition Define.h:135
#define TC_SHARED_API
Definition Define.h:108
uint16_t uint16
Definition Define.h:134
uint32_t uint32
Definition Define.h:133
RealmFlags
Definition Realm.h:27
@ REALM_FLAG_NEW
Definition Realm.h:35
@ REALM_FLAG_OFFLINE
Definition Realm.h:30
@ REALM_FLAG_UNK1
Definition Realm.h:32
@ REALM_FLAG_NONE
Definition Realm.h:28
@ REALM_FLAG_UNK2
Definition Realm.h:33
@ REALM_FLAG_VERSION_MISMATCH
Definition Realm.h:29
@ REALM_FLAG_RECOMMENDED
Definition Realm.h:34
@ REALM_FLAG_FULL
Definition Realm.h:36
@ REALM_FLAG_SPECIFYBUILD
Definition Realm.h:31
RealmType
Type of server, this is values from second column of Cfg_Configs.dbc.
Definition Realm.h:51
@ REALM_TYPE_FFA_PVP
Definition Realm.h:60
@ MAX_CLIENT_REALM_TYPE
Definition Realm.h:58
@ REALM_TYPE_RPPVP
Definition Realm.h:56
@ REALM_TYPE_PVP
Definition Realm.h:53
@ REALM_TYPE_RP
Definition Realm.h:55
@ REALM_TYPE_NORMAL2
Definition Realm.h:54
@ REALM_TYPE_NORMAL
Definition Realm.h:52
std::strong_ordering operator<=>(RealmHandle const &r) const
Definition Realm.h:46
uint32 Realm
Definition Realm.h:44
RealmHandle(uint32 index)
Definition Realm.h:42
RealmHandle()
Definition Realm.h:41
Definition Realm.h:66
uint16 Port
Definition Realm.h:72
RealmFlags Flags
Definition Realm.h:75
AccountTypes AllowedSecurityLevel
Definition Realm.h:77
uint8 Timezone
Definition Realm.h:76
std::unique_ptr< boost::asio::ip::address > LocalSubnetMask
Definition Realm.h:71
std::unique_ptr< boost::asio::ip::address > LocalAddress
Definition Realm.h:70
float PopulationLevel
Definition Realm.h:78
uint32 Build
Definition Realm.h:68
std::unique_ptr< boost::asio::ip::address > ExternalAddress
Definition Realm.h:69
std::string Name
Definition Realm.h:73
RealmHandle Id
Definition Realm.h:67
uint8 Type
Definition Realm.h:74