From e34a496ae3b6fbb98115b9fe524cd202ddc8f795 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 6 Apr 2018 21:58:15 +0300 Subject: Add packet SMSG_SOLVE_CHAR_NAME 0x0af7. --- src/net/eathena/beingrecv.cpp | 10 ++++++++++ src/net/eathena/network.cpp | 2 ++ src/net/eathena/packetsin.inc | 18 ++++++++++++++++++ 3 files changed, 30 insertions(+) (limited to 'src/net') diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp index 4fdcf7ad3..627d9d9a1 100644 --- a/src/net/eathena/beingrecv.cpp +++ b/src/net/eathena/beingrecv.cpp @@ -72,6 +72,8 @@ extern int serverVersion; extern OkDialog *deathNotice; +extern bool packets_re; +extern bool packets_main; namespace EAthena { @@ -2112,6 +2114,14 @@ void BeingRecv::processSkillCancel(Net::MessageIn &msg) void BeingRecv::processSolveCharName(Net::MessageIn &msg) { + if ((packets_re == true && msg.getVersion() >= 20180221) || + (packets_main == true && msg.getVersion() >= 20180307)) + { + const int flag = msg.readInt16("flag"); + // name request errors + if (flag != 3) + return; + } const int id = msg.readInt32("char id"); if (actorManager == nullptr) { diff --git a/src/net/eathena/network.cpp b/src/net/eathena/network.cpp index 9bf8a05b0..a68194e28 100644 --- a/src/net/eathena/network.cpp +++ b/src/net/eathena/network.cpp @@ -91,6 +91,8 @@ extern int packetVersion; extern int serverVersion; extern int evolPacketOffset; extern bool packets_zero; +extern bool packets_re; +extern bool packets_main; namespace EAthena { diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc index 0899ce834..187a5d382 100644 --- a/src/net/eathena/packetsin.inc +++ b/src/net/eathena/packetsin.inc @@ -1017,6 +1017,24 @@ if (packetVersion >= 20171207) packet(SMSG_PARTY_INFO, 0x0ae5, -1, &PartyRecv::processPartyInfo, 20171207); } +// re 20180221 +if (packets_re == true) +{ +if (packetVersion >= 20180221) +{ + packet(SMSG_SOLVE_CHAR_NAME, 0x0af7, 32, &BeingRecv::processSolveCharName, 20180221); +} +} + +// main 20180307 +if (packets_main == true) +{ +if (packetVersion >= 20180307) +{ + packet(SMSG_SOLVE_CHAR_NAME, 0x0af7, 32, &BeingRecv::processSolveCharName, 20180307); +} +} + // 0 // evol always packets packet(SMSG_SERVER_VERSION_RESPONSE, 0x7531, -1, &LoginRecv::processServerVersion, 0); -- cgit v1.2.3-70-g09d2