From ff86d5fbc7db586c05e51c99f052bbae4ebe44cc Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 6 Oct 2014 12:58:40 +0300 Subject: eathena: add partial support for packet SMSG_CHAR_CHANGE_SLOT 0x08d5. --- src/net/eathena/charserverhandler.cpp | 12 ++++++++++++ src/net/eathena/charserverhandler.h | 2 ++ src/net/eathena/packets.h | 2 +- src/net/eathena/protocol.h | 1 + 4 files changed, 16 insertions(+), 1 deletion(-) (limited to 'src/net') diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp index 2d89bb7d0..5308fdaea 100644 --- a/src/net/eathena/charserverhandler.cpp +++ b/src/net/eathena/charserverhandler.cpp @@ -84,6 +84,7 @@ CharServerHandler::CharServerHandler() : SMSG_CHAR_PINCODE_STATUS, SMSG_CHAR_CHECK_RENAME, SMSG_CHAR_RENAME, + SMSG_CHAR_CHANGE_SLOT, 0 }; handledMessages = _messages; @@ -142,6 +143,10 @@ void CharServerHandler::handleMessage(Net::MessageIn &msg) processCharRename(msg); break; + case SMSG_CHAR_CHANGE_SLOT: + processCharChangeSlot(msg); + break; + default: break; } @@ -569,4 +574,11 @@ void CharServerHandler::changeSlot(const int oldSlot, const int newSlot) outMsg.writeInt16(0, "unused"); } +void CharServerHandler::processCharChangeSlot(Net::MessageIn &msg) +{ + msg.readInt16("len"); + msg.readInt16("flag"); // 0 - ok, 1 - error + msg.readInt16("unused"); +} + } // namespace EAthena diff --git a/src/net/eathena/charserverhandler.h b/src/net/eathena/charserverhandler.h index ed27534bf..8b348271a 100644 --- a/src/net/eathena/charserverhandler.h +++ b/src/net/eathena/charserverhandler.h @@ -96,6 +96,8 @@ class CharServerHandler final : public MessageHandler, void processCharRename(Net::MessageIn &msg); + void processCharChangeSlot(Net::MessageIn &msg); + private: std::string mNewName; uint32_t mPinSeed; diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h index bd30b0dc9..c9a8f37f6 100644 --- a/src/net/eathena/packets.h +++ b/src/net/eathena/packets.h @@ -231,7 +231,7 @@ int16_t packet_lengths[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 10, 0, 0, 0, 0, 0, // #0x08C0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 10, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0 1 2 3 4 5 6 7 8 9 a b c d e f diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 29b372a1f..77e963fdb 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -41,6 +41,7 @@ #define SMSG_CHAR_PINCODE_STATUS 0x08b9 #define SMSG_CHAR_CHECK_RENAME 0x028e #define SMSG_CHAR_RENAME 0x0290 +#define SMSG_CHAR_CHANGE_SLOT 0x08d5 #define SMSG_CHAR_CREATE_FAILED 0x006e #define SMSG_CHAR_DELETE_SUCCEEDED 0x006f -- cgit v1.2.3-70-g09d2