summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
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 */