summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-13 17:55:47 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-13 17:55:47 +0300
commit6c54eedd18c808cd197cb16301fd08887713037a (patch)
treecb5b14c2b33b6236c18f7c633770a64447773286
parent3931471031744a47fd2eaf7adf52d59eb51d17a4 (diff)
downloadplus-6c54eedd18c808cd197cb16301fd08887713037a.tar.gz
plus-6c54eedd18c808cd197cb16301fd08887713037a.tar.bz2
plus-6c54eedd18c808cd197cb16301fd08887713037a.tar.xz
plus-6c54eedd18c808cd197cb16301fd08887713037a.zip
Move processCharCreate from ea namespace into eathena and tmwa.
-rw-r--r--src/net/ea/charserverhandler.cpp18
-rw-r--r--src/net/ea/charserverhandler.h2
-rw-r--r--src/net/eathena/charserverhandler.cpp20
-rw-r--r--src/net/eathena/charserverhandler.h2
-rw-r--r--src/net/tmwa/charserverhandler.cpp20
-rw-r--r--src/net/tmwa/charserverhandler.h2
6 files changed, 44 insertions, 20 deletions
diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp
index 36ac3d012..15bcb135a 100644
--- a/src/net/ea/charserverhandler.cpp
+++ b/src/net/ea/charserverhandler.cpp
@@ -142,24 +142,6 @@ void CharServerHandler::processCharLoginError(Net::MessageIn &msg) const
BLOCK_END("CharServerHandler::processCharLoginError")
}
-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")
-}
-
void CharServerHandler::processCharCreateFailed(Net::MessageIn &msg)
{
BLOCK_START("CharServerHandler::processCharCreateFailed")
diff --git a/src/net/ea/charserverhandler.h b/src/net/ea/charserverhandler.h
index fec1d1781..ce5443753 100644
--- a/src/net/ea/charserverhandler.h
+++ b/src/net/ea/charserverhandler.h
@@ -64,8 +64,6 @@ class CharServerHandler notfinal : public Net::CharServerHandler
virtual void processCharLoginError(Net::MessageIn &msg) const;
- virtual void processCharCreate(Net::MessageIn &msg);
-
virtual void processCharCreateFailed(Net::MessageIn &msg);
virtual void processCharDelete(Net::MessageIn &msg);
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;
diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp
index 305add158..4167a3620 100644
--- a/src/net/tmwa/charserverhandler.cpp
+++ b/src/net/tmwa/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"
@@ -429,4 +431,22 @@ void CharServerHandler::processChangeMapServer(Net::MessageIn &msg)
BLOCK_END("CharServerHandler::processChangeMapServer")
}
+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 TmwAthena
diff --git a/src/net/tmwa/charserverhandler.h b/src/net/tmwa/charserverhandler.h
index 757474c4c..02e732bc8 100644
--- a/src/net/tmwa/charserverhandler.h
+++ b/src/net/tmwa/charserverhandler.h
@@ -73,6 +73,8 @@ class CharServerHandler final : public MessageHandler,
void readPlayerData(Net::MessageIn &msg,
Net::Character *const character,
const bool withColors) const override final;
+
+ void processCharCreate(Net::MessageIn &msg);
};
} // namespace TmwAthena