GCC Code Coverage Report
Directory: src/ Exec Total Coverage
File: src/net/eathena/serverfeatures.cpp Lines: 10 50 20.0 %
Date: 2021-03-17 Branches: 0 0 0.0 %

Line Branch Exec Source
1
/*
2
 *  The ManaPlus Client
3
 *  Copyright (C) 2011-2019  The ManaPlus Developers
4
 *  Copyright (C) 2019-2021  Andrei Karas
5
 *
6
 *  This file is part of The ManaPlus Client.
7
 *
8
 *  This program is free software; you can redistribute it and/or modify
9
 *  it under the terms of the GNU General Public License as published by
10
 *  the Free Software Foundation; either version 2 of the License, or
11
 *  any later version.
12
 *
13
 *  This program is distributed in the hope that it will be useful,
14
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 *  GNU General Public License for more details.
17
 *
18
 *  You should have received a copy of the GNU General Public License
19
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
 */
21
22
#include "net/eathena/serverfeatures.h"
23
24
#include "net/net.h"
25
26
#include "debug.h"
27
28
extern int serverVersion;
29
30
namespace EAthena
31
{
32
33
77
ServerFeatures::ServerFeatures() :
34
154
    Net::ServerFeatures()
35
{
36
77
    serverFeatures = this;
37
77
}
38
39
1
bool ServerFeatures::haveServerOnlineList() const
40
{
41
1
    return serverVersion > 0;
42
}
43
44
bool ServerFeatures::haveServerHp() const
45
{
46
    return true;
47
}
48
49
bool ServerFeatures::havePlayerStatusUpdate() const
50
{
51
    return serverVersion > 0;
52
}
53
54
bool ServerFeatures::haveIncompleteChatMessages() const
55
{
56
    return false;
57
}
58
59
bool ServerFeatures::haveRaceSelection() const
60
{
61
    return serverVersion > 0;
62
}
63
64
bool ServerFeatures::haveLookSelection() const
65
{
66
    return serverVersion > 0;
67
}
68
69
bool ServerFeatures::haveMove3() const
70
{
71
    return serverVersion > 0;
72
}
73
74
bool ServerFeatures::haveMonsterAttackRange() const
75
{
76
    return false;
77
}
78
79
1
bool ServerFeatures::haveEmailOnRegister() const
80
{
81
1
    return serverVersion > 0;
82
}
83
84
bool ServerFeatures::haveEmailOnDelete() const
85
{
86
    return serverVersion > 0;
87
}
88
89
bool ServerFeatures::haveServerVersion() const
90
{
91
    return Net::getNetworkType() == ServerType::EVOL2;
92
}
93
94
bool ServerFeatures::haveMapServerVersion() const
95
{
96
    return serverVersion > 0;
97
}
98
99
bool ServerFeatures::haveNpcGender() const
100
{
101
    return serverVersion > 0;
102
}
103
104
bool ServerFeatures::haveJoinChannel() const
105
{
106
    return serverVersion > 0;
107
}
108
109
bool ServerFeatures::haveCreateCharGender() const
110
{
111
    return serverVersion > 0;
112
}
113
114
bool ServerFeatures::haveTalkPet() const
115
{
116
    return serverVersion > 0;
117
}
118
119
bool ServerFeatures::haveMovePet() const
120
{
121
    return serverVersion > 0;
122
}
123
124
bool ServerFeatures::haveServerWarpNames() const
125
{
126
    return serverVersion == 0;
127
}
128
129
bool ServerFeatures::haveExtendedRiding() const
130
{
131
    return serverVersion > 0;
132
}
133
134
bool ServerFeatures::haveExtendedDropsPosition() const
135
{
136
    return serverVersion > 0;
137
}
138
139
bool ServerFeatures::haveMoveWhileSit() const
140
{
141
    return serverVersion > 0;
142
}
143
144
bool ServerFeatures::haveKillerId() const
145
{
146
    return serverVersion > 0;
147
}
148
149
1
bool ServerFeatures::havePincode() const
150
{
151
1
    return true;
152
}
153
154
}  // namespace EAthena