diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-17 14:51:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-17 14:51:23 +0300 |
commit | c4802097dec05ca39e395e7dba3a55dba70edbe8 (patch) | |
tree | b78e4d197a6e88dd646bc46b1c00286f97c63011 /src/net/eathena | |
parent | e0bd37fd01e8c14bf6d044382ac12cc11f5eaa43 (diff) | |
download | plus-c4802097dec05ca39e395e7dba3a55dba70edbe8.tar.gz plus-c4802097dec05ca39e395e7dba3a55dba70edbe8.tar.bz2 plus-c4802097dec05ca39e395e7dba3a55dba70edbe8.tar.xz plus-c4802097dec05ca39e395e7dba3a55dba70edbe8.zip |
Add static in chatserverhandler.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/charserverhandler.cpp | 21 | ||||
-rw-r--r-- | src/net/eathena/charserverhandler.h | 22 |
2 files changed, 25 insertions, 18 deletions
diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp index 5db0a0d79..3329f919b 100644 --- a/src/net/eathena/charserverhandler.cpp +++ b/src/net/eathena/charserverhandler.cpp @@ -61,15 +61,22 @@ namespace EAthena extern ServerInfo charServer; extern ServerInfo mapServer; +std::string CharServerHandler::mNewName; +uint32_t CharServerHandler::mPinSeed = 0; +uint32_t CharServerHandler::mPinAccountId = 0; +uint32_t CharServerHandler::mRenameId = 0; +bool CharServerHandler::mNeedCreatePin = false; + CharServerHandler::CharServerHandler() : MessageHandler(), - Ea::CharServerHandler(), - mNewName(), - mPinSeed(0), - mPinAccountId(0), - mRenameId(0), - mNeedCreatePin(false) + Ea::CharServerHandler() { + mNewName.clear(); + mPinSeed = 0; + mPinAccountId = 0; + mRenameId = 0; + mNeedCreatePin = false; + static const uint16_t _messages[] = { SMSG_CHAR_LOGIN, @@ -479,7 +486,7 @@ void CharServerHandler::processCharCreate(Net::MessageIn &msg) { BLOCK_START("CharServerHandler::processCharCreate") Net::Character *const character = new Net::Character; - readPlayerData(msg, character, false); + charServerHandler->readPlayerData(msg, character, false); mCharacters.push_back(character); updateCharSelectDialog(); diff --git a/src/net/eathena/charserverhandler.h b/src/net/eathena/charserverhandler.h index 8b348271a..0e029e076 100644 --- a/src/net/eathena/charserverhandler.h +++ b/src/net/eathena/charserverhandler.h @@ -81,29 +81,29 @@ class CharServerHandler final : public MessageHandler, void changeSlot(const int oldSlot, const int newSlot) override final; - protected: void readPlayerData(Net::MessageIn &msg, Net::Character *const character, const bool) const override final; - void processPincodeStatus(Net::MessageIn &msg); + protected: + static void processPincodeStatus(Net::MessageIn &msg); static void processCharLogin2(Net::MessageIn &msg); - void processCharCreate(Net::MessageIn &msg); + static void processCharCreate(Net::MessageIn &msg); - void processCharCheckRename(Net::MessageIn &msg); + static void processCharCheckRename(Net::MessageIn &msg); - void processCharRename(Net::MessageIn &msg); + static void processCharRename(Net::MessageIn &msg); - void processCharChangeSlot(Net::MessageIn &msg); + static void processCharChangeSlot(Net::MessageIn &msg); private: - std::string mNewName; - uint32_t mPinSeed; - uint32_t mPinAccountId; - uint32_t mRenameId; - bool mNeedCreatePin; + static std::string mNewName; + static uint32_t mPinSeed; + static uint32_t mPinAccountId; + static uint32_t mRenameId; + static bool mNeedCreatePin; }; } // namespace EAthena |