GCC Code Coverage Report
Directory: src/ Exec Total Coverage
File: src/net/tmwa/serverfeatures.cpp Lines: 0 49 0.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/tmwa/serverfeatures.h"
23
24
#include "debug.h"
25
26
extern unsigned int tmwServerVersion;
27
28
namespace TmwAthena
29
{
30
31
ServerFeatures::ServerFeatures() :
32
    Net::ServerFeatures()
33
{
34
    serverFeatures = this;
35
}
36
37
bool ServerFeatures::haveServerOnlineList() const
38
{
39
    return tmwServerVersion >= 0x120b0b;
40
}
41
42
bool ServerFeatures::haveServerHp() const
43
{
44
    return tmwServerVersion > 0x0f0513;
45
}
46
47
bool ServerFeatures::havePlayerStatusUpdate() const
48
{
49
    return false;
50
}
51
52
bool ServerFeatures::haveIncompleteChatMessages() const
53
{
54
    return tmwServerVersion <= 0x100209;
55
}
56
57
bool ServerFeatures::haveRaceSelection() const
58
{
59
    return false;
60
}
61
62
bool ServerFeatures::haveLookSelection() const
63
{
64
    return false;
65
}
66
67
bool ServerFeatures::haveMove3() const
68
{
69
    return tmwServerVersion >= 0x0f0512 && tmwServerVersion <= 0xf0706;
70
}
71
72
bool ServerFeatures::haveMonsterAttackRange() const
73
{
74
    return tmwServerVersion >= 0x0f0513;
75
}
76
77
bool ServerFeatures::haveEmailOnRegister() const
78
{
79
    return false;
80
}
81
82
bool ServerFeatures::haveEmailOnDelete() const
83
{
84
    return false;
85
}
86
87
bool ServerFeatures::haveServerVersion() const
88
{
89
    return true;
90
}
91
92
bool ServerFeatures::haveMapServerVersion() const
93
{
94
    return false;
95
}
96
97
bool ServerFeatures::haveNpcGender() const
98
{
99
    return tmwServerVersion >= 0x0f0513;
100
}
101
102
bool ServerFeatures::haveJoinChannel() const
103
{
104
    return false;
105
}
106
107
bool ServerFeatures::haveCreateCharGender() const
108
{
109
    return tmwServerVersion > 0x0f0b17;
110
}
111
112
bool ServerFeatures::haveTalkPet() const
113
{
114
    return true;
115
}
116
117
bool ServerFeatures::haveMovePet() const
118
{
119
    return true;
120
}
121
122
bool ServerFeatures::haveServerWarpNames() const
123
{
124
    return false;
125
}
126
127
bool ServerFeatures::haveExtendedRiding() const
128
{
129
    return false;
130
}
131
132
bool ServerFeatures::haveExtendedDropsPosition() const
133
{
134
    return false;
135
}
136
137
bool ServerFeatures::haveMoveWhileSit() const
138
{
139
    return true;
140
}
141
142
bool ServerFeatures::haveKillerId() const
143
{
144
    return false;
145
}
146
147
bool ServerFeatures::havePincode() const
148
{
149
    return false;
150
}
151
152
}  // namespace TmwAthena