summaryrefslogtreecommitdiff
path: root/src/net/tmwa/playerhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-01-14 18:01:11 +0300
committerAndrei Karas <akaras@inbox.ru>2015-01-14 18:01:11 +0300
commitf86221f5fe1bc54b3e643169d510b01f991e5f04 (patch)
tree9eb9409aa9f5ee99ac3f69cf83caa6177a64845e /src/net/tmwa/playerhandler.cpp
parentafa7cdd59fe9a80479812eaad73a1eeea58bd5de (diff)
downloadplus-f86221f5fe1bc54b3e643169d510b01f991e5f04.tar.gz
plus-f86221f5fe1bc54b3e643169d510b01f991e5f04.tar.bz2
plus-f86221f5fe1bc54b3e643169d510b01f991e5f04.tar.xz
plus-f86221f5fe1bc54b3e643169d510b01f991e5f04.zip
Remove support for evol1 server version less than actual.
Diffstat (limited to 'src/net/tmwa/playerhandler.cpp')
-rw-r--r--src/net/tmwa/playerhandler.cpp37
1 files changed, 13 insertions, 24 deletions
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index ec0bd3d54..e7b5deb6c 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -273,38 +273,27 @@ void PlayerHandler::processOnlineList(Net::MessageIn &msg)
const char *buf = start;
- int addVal = 1;
- if (serverVersion >= 4)
- addVal = 3;
+ int addVal = 3;
while (buf - start + 1 < size
&& *(buf + static_cast<size_t>(addVal)))
{
- unsigned char status = 255;
- unsigned char ver = 0;
- unsigned char level = 0;
- if (serverVersion >= 4)
- {
- status = *buf;
- buf ++;
- level = *buf;
- buf ++;
- ver = *buf;
- }
+ unsigned char status = *buf;
+ buf ++;
+ unsigned char level = *buf;
+ buf ++;
+ unsigned char ver = *buf;
buf ++;
unsigned char gender = Gender::UNSPECIFIED;
- if (serverVersion >= 4)
+ if (config.getBoolValue("showgender"))
{
- if (config.getBoolValue("showgender"))
- {
- if (status & BeingFlag::GENDER_MALE)
- gender = Gender::MALE;
- else if (status & BeingFlag::GENDER_OTHER)
- gender = Gender::OTHER;
- else
- gender = Gender::FEMALE;
- }
+ if (status & BeingFlag::GENDER_MALE)
+ gender = Gender::MALE;
+ else if (status & BeingFlag::GENDER_OTHER)
+ gender = Gender::OTHER;
+ else
+ gender = Gender::FEMALE;
}
arr.push_back(new OnlinePlayer(static_cast<const char*>(buf),
status, level, gender, ver));