diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-06 12:58:40 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-06 12:58:40 +0300 |
commit | ff86d5fbc7db586c05e51c99f052bbae4ebe44cc (patch) | |
tree | 32a30c479f00ba66b13732d09e0f35f55cd6cedb | |
parent | cb8de74ca982c59387f83047201ecd75ee1ed533 (diff) | |
download | mv-ff86d5fbc7db586c05e51c99f052bbae4ebe44cc.tar.gz mv-ff86d5fbc7db586c05e51c99f052bbae4ebe44cc.tar.bz2 mv-ff86d5fbc7db586c05e51c99f052bbae4ebe44cc.tar.xz mv-ff86d5fbc7db586c05e51c99f052bbae4ebe44cc.zip |
eathena: add partial support for packet SMSG_CHAR_CHANGE_SLOT 0x08d5.
-rw-r--r-- | src/net/eathena/charserverhandler.cpp | 12 | ||||
-rw-r--r-- | src/net/eathena/charserverhandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/packets.h | 2 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 1 |
4 files changed, 16 insertions, 1 deletions
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 |