summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorFedja Beader <fedja@protonmail.ch>2024-04-23 22:00:00 +0200
committerFedja Beader <fedja@protonmail.ch>2024-04-27 20:14:02 +0200
commit1757e42c58b105722a8c49253d3fc63576a93502 (patch)
tree0373197d52e7515a7de8132ac40058b8744c4bb7 /src/net
parentf74de2c2762999be3c2c37749313746a9ae948c3 (diff)
downloadplus-1757e42c58b105722a8c49253d3fc63576a93502.tar.gz
plus-1757e42c58b105722a8c49253d3fc63576a93502.tar.bz2
plus-1757e42c58b105722a8c49253d3fc63576a93502.tar.xz
plus-1757e42c58b105722a8c49253d3fc63576a93502.zip
deduplicate branches
Diffstat (limited to 'src/net')
-rw-r--r--src/net/tmwa/loginrecv.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/net/tmwa/loginrecv.cpp b/src/net/tmwa/loginrecv.cpp
index 25341889a..aa9b89fb9 100644
--- a/src/net/tmwa/loginrecv.cpp
+++ b/src/net/tmwa/loginrecv.cpp
@@ -62,28 +62,23 @@ void LoginRecv::processServerVersion(Net::MessageIn &msg)
const uint8_t b2 = msg.readUInt8("b2");
const uint8_t b3 = msg.readUInt8("b3");
msg.readUInt8("b4");
+ const unsigned int options = msg.readInt32("options");
+
+ Ea::LoginRecv::mRegistrationEnabled =
+ ((options & FLAG_REGISTRATION) != 0U);
+
+ serverVersion = 0;
+
if (b1 == 255)
{ // old TMWA
- const unsigned int options = msg.readInt32("options");
- Ea::LoginRecv::mRegistrationEnabled =
- ((options & FLAG_REGISTRATION) != 0U);
- serverVersion = 0;
tmwServerVersion = 0;
}
else if (b1 >= 0x0d)
{ // new TMWA
- const unsigned int options = msg.readInt32("options");
- Ea::LoginRecv::mRegistrationEnabled =
- ((options & FLAG_REGISTRATION) != 0U);
- serverVersion = 0;
tmwServerVersion = (b1 << 16) | (b2 << 8) | b3;
}
else
{ // eAthena
- const unsigned int options = msg.readInt32("options");
- Ea::LoginRecv::mRegistrationEnabled =
- ((options & FLAG_REGISTRATION) != 0U);
- serverVersion = 0;
tmwServerVersion = 0;
}