diff options
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 |