diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-13 17:55:47 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-13 17:55:47 +0300 |
commit | 6c54eedd18c808cd197cb16301fd08887713037a (patch) | |
tree | cb5b14c2b33b6236c18f7c633770a64447773286 /src/net/eathena/charserverhandler.cpp | |
parent | 3931471031744a47fd2eaf7adf52d59eb51d17a4 (diff) | |
download | mv-6c54eedd18c808cd197cb16301fd08887713037a.tar.gz mv-6c54eedd18c808cd197cb16301fd08887713037a.tar.bz2 mv-6c54eedd18c808cd197cb16301fd08887713037a.tar.xz mv-6c54eedd18c808cd197cb16301fd08887713037a.zip |
Move processCharCreate from ea namespace into eathena and tmwa.
Diffstat (limited to 'src/net/eathena/charserverhandler.cpp')
-rw-r--r-- | src/net/eathena/charserverhandler.cpp | 20 |
1 files changed, 20 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 |