summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/charserverhandler.cpp20
-rw-r--r--src/net/eathena/charserverhandler.h2
2 files changed, 22 insertions, 0 deletions
diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp
index cea59955c..771a9128b 100644
--- a/src/net/eathena/charserverhandler.cpp
+++ b/src/net/eathena/charserverhandler.cpp
@@ -28,6 +28,8 @@
#include "being/attributes.h"
+#include "gui/windows/charcreatedialog.h"
+
#include "net/character.h"
#include "net/logindata.h"
#include "net/net.h"
@@ -437,4 +439,22 @@ void CharServerHandler::setNewPincode(const std::string &pin A_UNUSED)
// outMsg.writeString(pin, 4, "encrypted pin");
}
+void CharServerHandler::processCharCreate(Net::MessageIn &msg)
+{
+ BLOCK_START("CharServerHandler::processCharCreate")
+ Net::Character *const character = new Net::Character;
+ readPlayerData(msg, character, msg.getId() == SMSG_CHAR_CREATE_SUCCEEDED2);
+ mCharacters.push_back(character);
+
+ updateCharSelectDialog();
+
+ // Close the character create dialog
+ if (mCharCreateDialog)
+ {
+ mCharCreateDialog->scheduleDelete();
+ mCharCreateDialog = nullptr;
+ }
+ BLOCK_END("CharServerHandler::processCharCreate")
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/charserverhandler.h b/src/net/eathena/charserverhandler.h
index 82e13c680..d14c82cb7 100644
--- a/src/net/eathena/charserverhandler.h
+++ b/src/net/eathena/charserverhandler.h
@@ -77,6 +77,8 @@ class CharServerHandler final : public MessageHandler,
static void processCharLogin2(Net::MessageIn &msg);
+ void processCharCreate(Net::MessageIn &msg);
+
private:
uint32_t mPinSeed;
uint32_t mPinAccountId;