diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-27 22:43:35 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-27 22:43:35 +0300 |
commit | 521b3f671d34e67abeb268ce17aa1db2cddbf4e8 (patch) | |
tree | d41402e9346d2a689808c6716d82a030a04327b1 | |
parent | d33c5a8ebc0c2db983d2bacf4dfe7b66d59dbb35 (diff) | |
download | manaverse-521b3f671d34e67abeb268ce17aa1db2cddbf4e8.tar.gz manaverse-521b3f671d34e67abeb268ce17aa1db2cddbf4e8.tar.bz2 manaverse-521b3f671d34e67abeb268ce17aa1db2cddbf4e8.tar.xz manaverse-521b3f671d34e67abeb268ce17aa1db2cddbf4e8.zip |
Impliment packet CMSG_LOGIN_REGISTER_HAN.
Use CMSG_LOGIN_REGISTER_HAN for login to plain hercules.
-rw-r--r-- | src/net/eathena/loginhandler.cpp | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/net/eathena/loginhandler.cpp b/src/net/eathena/loginhandler.cpp index 5c99908f8..9541bc291 100644 --- a/src/net/eathena/loginhandler.cpp +++ b/src/net/eathena/loginhandler.cpp @@ -25,6 +25,7 @@ #include "client.h" #include "net/generalhandler.h" +#include "net/net.h" #include "net/serverfeatures.h" #include "net/eathena/messageout.h" @@ -99,11 +100,25 @@ void LoginHandler::sendLoginRegister(const std::string &restrict username, { if (email.empty()) { - createOutPacket(CMSG_LOGIN_REGISTER); - outMsg.writeInt32(20, "client version"); - outMsg.writeString(username, 24, "login"); - outMsg.writeStringNoLog(password, 24, "password"); - outMsg.writeInt8(0x03, "client type"); + if (Net::getNetworkType() == ServerType::EATHENA) + { + createOutPacket(CMSG_LOGIN_REGISTER_HAN); + outMsg.writeInt32(20, "client version"); + outMsg.writeString(username, 24, "login"); + outMsg.writeStringNoLog(password, 24, "password"); + outMsg.writeInt8(0x03, "client type"); + outMsg.writeString("127.0.0.1", 16, "ip address"); + outMsg.writeString("001122334455", 13, "mac address"); + outMsg.writeInt8(0, "is gravity id"); + } + else + { + createOutPacket(CMSG_LOGIN_REGISTER); + outMsg.writeInt32(20, "client version"); + outMsg.writeString(username, 24, "login"); + outMsg.writeStringNoLog(password, 24, "password"); + outMsg.writeInt8(0x03, "client type"); + } } else { |