From f86221f5fe1bc54b3e643169d510b01f991e5f04 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 14 Jan 2015 18:01:11 +0300 Subject: Remove support for evol1 server version less than actual. --- src/net/tmwa/playerhandler.cpp | 37 +++++++++++++------------------------ 1 file changed, 13 insertions(+), 24 deletions(-) (limited to 'src/net/tmwa') 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(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(buf), status, level, gender, ver)); -- cgit v1.2.3-70-g09d2