diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-05 18:33:30 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-05 18:33:30 +0300 |
commit | c43d0ae7b171373f4ee352c8faa4ae6a7e93c49c (patch) | |
tree | 6ba7d58927ba02b3d564825de475233ed2efa98f /src/net | |
parent | e282f887a203e46be91e1d1bf0024d95214ed98c (diff) | |
download | manaplus-c43d0ae7b171373f4ee352c8faa4ae6a7e93c49c.tar.gz manaplus-c43d0ae7b171373f4ee352c8faa4ae6a7e93c49c.tar.bz2 manaplus-c43d0ae7b171373f4ee352c8faa4ae6a7e93c49c.tar.xz manaplus-c43d0ae7b171373f4ee352c8faa4ae6a7e93c49c.zip |
eathena: add packet CMSG_CHAR_RENAME 0x08fc.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/charserverhandler.h | 3 | ||||
-rw-r--r-- | src/net/eathena/charserverhandler.cpp | 11 | ||||
-rw-r--r-- | src/net/eathena/charserverhandler.h | 3 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 1 | ||||
-rw-r--r-- | src/net/tmwa/charserverhandler.cpp | 5 | ||||
-rw-r--r-- | src/net/tmwa/charserverhandler.h | 3 |
6 files changed, 26 insertions, 0 deletions
diff --git a/src/net/charserverhandler.h b/src/net/charserverhandler.h index 2ad06901d..3b45e3e33 100644 --- a/src/net/charserverhandler.h +++ b/src/net/charserverhandler.h @@ -63,6 +63,9 @@ class CharServerHandler notfinal virtual void deleteCharacter(Net::Character *const character) = 0; + virtual void renameCharacter(Net::Character *const character, + const std::string &newName) = 0; + virtual void switchCharacter() const = 0; virtual unsigned int baseSprite() const A_WARN_UNUSED = 0; diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp index b62ff5cf0..22c9ee849 100644 --- a/src/net/eathena/charserverhandler.cpp +++ b/src/net/eathena/charserverhandler.cpp @@ -471,4 +471,15 @@ void CharServerHandler::processCharCreate(Net::MessageIn &msg) BLOCK_END("CharServerHandler::processCharCreate") } +void CharServerHandler::renameCharacter(Net::Character *const character, + const std::string &newName) +{ + if (!character) + return; + + createOutPacket(CMSG_CHAR_RENAME); + outMsg.writeInt32(mSelectedCharacter->dummy->getId(), "char id"); + outMsg.writeString(newName, 24, "name"); +} + } // namespace EAthena diff --git a/src/net/eathena/charserverhandler.h b/src/net/eathena/charserverhandler.h index cd14660ed..8fe6a27a4 100644 --- a/src/net/eathena/charserverhandler.h +++ b/src/net/eathena/charserverhandler.h @@ -51,6 +51,9 @@ class CharServerHandler final : public MessageHandler, const unsigned char look, const std::vector<int> &stats) const override final; + void renameCharacter(Net::Character *const character, + const std::string &newName) override final; + void deleteCharacter(Net::Character *const character) override final; void switchCharacter() const override final; diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 326ed3bad..7e9de4e8f 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -291,6 +291,7 @@ #define CMSG_CHAR_CREATE 0x0970 #define CMSG_CHAR_DELETE 0x0068 #define CMSG_CHAR_CREATE_PIN 0x08ba +#define CMSG_CHAR_RENAME 0x08fc #define CMSG_MAP_SERVER_CONNECT 0x089c #define CMSG_MAP_PING 0x035f /**< Send to server with tick */ diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp index 732e438e6..274120a83 100644 --- a/src/net/tmwa/charserverhandler.cpp +++ b/src/net/tmwa/charserverhandler.cpp @@ -511,4 +511,9 @@ void CharServerHandler::processCharCreate2(Net::MessageIn &msg) BLOCK_END("CharServerHandler::processCharCreate2") } +void CharServerHandler::renameCharacter(Net::Character *const character, + const std::string &newName) +{ +} + } // namespace TmwAthena diff --git a/src/net/tmwa/charserverhandler.h b/src/net/tmwa/charserverhandler.h index 0fd6f1f93..29af074a5 100644 --- a/src/net/tmwa/charserverhandler.h +++ b/src/net/tmwa/charserverhandler.h @@ -53,6 +53,9 @@ class CharServerHandler final : public MessageHandler, void deleteCharacter(Net::Character *const character) override final; + void renameCharacter(Net::Character *const character, + const std::string &newName) override final; + void switchCharacter() const override final; void connect() override final; |