From 521b3f671d34e67abeb268ce17aa1db2cddbf4e8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 27 Apr 2016 22:43:35 +0300 Subject: Impliment packet CMSG_LOGIN_REGISTER_HAN. Use CMSG_LOGIN_REGISTER_HAN for login to plain hercules. --- src/net/eathena/loginhandler.cpp | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'src/net') 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 { -- cgit v1.2.3-60-g2f50