summaryrefslogtreecommitdiff
path: root/src/login/globals.cpp
blob: 4df9edaed83665e3210ca0d22a034c208a1ca5a2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include "globals.hpp"
//    globals.cpp - Evil global variables for tmwa-login.
//
//    Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
//
//    This file is part of The Mana World (Athena server)
//
//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with this program.  If not, see <http://www.gnu.org/licenses/>.

#include "../generic/array.hpp"
#include "../generic/db.hpp"

#include "login.hpp"
#include "login_conf.hpp"
#include "login_lan_conf.hpp"

#include "../poison.hpp"


namespace tmwa
{
    namespace login
    {
        LoginConf login_conf;
        LoginLanConf login_lan_conf;
        AccountId account_id_count = START_ACCOUNT_NUM;
        tick_t creation_time_GM_account_file;
        Array<mmo_char_server, MAX_SERVERS> server;
        Array<Session *, MAX_SERVERS> server_session;
        // Char-server anti-freeze system. Counter. 5 ok, 4...0 freezed
        Array<int, MAX_SERVERS> server_freezeflag;
        Session *login_session;
        // minimum level of player/GM (0: player, 1-99: gm) to connect on the server
        std::vector<AuthData> auth_data;
        // TODO make this just be Map<AccountId, GmLevel>
        Map<AccountId, GM_Account> gm_account_db;
        // For forked DB writes
        pid_t pid = 0;
    } // namespace login
} // namespace tmwa