summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-05 18:33:30 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-05 18:33:30 +0300
commitc43d0ae7b171373f4ee352c8faa4ae6a7e93c49c (patch)
tree6ba7d58927ba02b3d564825de475233ed2efa98f /src/net/eathena
parente282f887a203e46be91e1d1bf0024d95214ed98c (diff)
downloadmanaplus-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/eathena')
-rw-r--r--src/net/eathena/charserverhandler.cpp11
-rw-r--r--src/net/eathena/charserverhandler.h3
-rw-r--r--src/net/eathena/protocol.h1
3 files changed, 15 insertions, 0 deletions
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 */