GCC Code Coverage Report
Directory: src/ Exec Total Coverage
File: src/net/eathena/serverfeatures.cpp Lines: 8 50 16.0 %
Date: 2017-11-29 Branches: 0 0 0.0 %

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