diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-31 20:45:39 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-06 01:18:54 +0300 |
commit | 87e351fa21e94991038f3ca1cae1767b81071507 (patch) | |
tree | f504d6b760901a3a4f8c7be70d6f7cd84638e6af /src/net/eathena/charserverhandler.cpp | |
parent | 8ad8da325107ef1b33bd6c3ed985859e7edb78ae (diff) | |
download | manaverse-87e351fa21e94991038f3ca1cae1767b81071507.tar.gz manaverse-87e351fa21e94991038f3ca1cae1767b81071507.tar.bz2 manaverse-87e351fa21e94991038f3ca1cae1767b81071507.tar.xz manaverse-87e351fa21e94991038f3ca1cae1767b81071507.zip |
Add partial pincode sending.
Need reverse or find way how to encrypt pincode.
For now pincodes not supported.
Diffstat (limited to 'src/net/eathena/charserverhandler.cpp')
-rw-r--r-- | src/net/eathena/charserverhandler.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp index 7d6e2e74c..39ebe52e2 100644 --- a/src/net/eathena/charserverhandler.cpp +++ b/src/net/eathena/charserverhandler.cpp @@ -65,6 +65,7 @@ CharServerHandler::CharServerHandler() : MessageHandler(), Ea::CharServerHandler(), mPinSeed(0), + mPinAccountId(0), mNeedCreatePin(false) { static const uint16_t _messages[] = @@ -385,8 +386,8 @@ void CharServerHandler::processChangeMapServer(Net::MessageIn &msg) void CharServerHandler::processPincodeStatus(Net::MessageIn &msg) { - const uint32_t seed = msg.readInt32("pincode seed"); - msg.readInt32("account id"); + mPinSeed = msg.readInt32("pincode seed"); + mPinAccountId = msg.readInt32("account id"); const uint16_t state = static_cast<uint16_t>(msg.readInt16("state")); switch (state) { @@ -397,7 +398,6 @@ void CharServerHandler::processPincodeStatus(Net::MessageIn &msg) case 2: // create new pin case 4: // create new pin? { - mPinSeed = seed; mNeedCreatePin = true; break; } @@ -418,4 +418,13 @@ void CharServerHandler::processPincodeStatus(Net::MessageIn &msg) } } +void CharServerHandler::setNewPincode(const std::string &pin) +{ +// here need ecript pin with mPinSeed and pin values. + +// MessageOut outMsg(CMSG_CHAR_CREATE_PIN); +// outMsg.writeInt32(mPinAccountId, "account id"); +// outMsg.writeString(pin, 4, "encrypted pin"); +} + } // namespace EAthena |