diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-07-14 00:49:40 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-07-14 00:49:40 +0300 |
commit | acd87806b767d70c0676c0f800e23a7ce4f623e0 (patch) | |
tree | 3929d2c0e19d4abe9db62943816a156e7472eb19 /src/net/eathena/charserverrecv.cpp | |
parent | a14077ce17133d7a7e12a747c067c07deca1c1f7 (diff) | |
download | plus-acd87806b767d70c0676c0f800e23a7ce4f623e0.tar.gz plus-acd87806b767d70c0676c0f800e23a7ce4f623e0.tar.bz2 plus-acd87806b767d70c0676c0f800e23a7ce4f623e0.tar.xz plus-acd87806b767d70c0676c0f800e23a7ce4f623e0.zip |
Add packet SMSG_CHAR_PINCODE_STATUS2 0x0ae9.
Diffstat (limited to 'src/net/eathena/charserverrecv.cpp')
-rw-r--r-- | src/net/eathena/charserverrecv.cpp | 44 |
1 files changed, 15 insertions, 29 deletions
diff --git a/src/net/eathena/charserverrecv.cpp b/src/net/eathena/charserverrecv.cpp index 85662e92b..3100aaebb 100644 --- a/src/net/eathena/charserverrecv.cpp +++ b/src/net/eathena/charserverrecv.cpp @@ -349,38 +349,24 @@ void CharServerRecv::processPincodeStatus(Net::MessageIn &msg) { pincodeManager.setSeed(msg.readUInt32("pincode seed")); pincodeManager.setAccountId(msg.readBeingId("account id")); + pincodeManager.setPincodeLockFlag(false); + if (pincodeManager.processPincodeStatus(CAST_U16( + msg.readInt16("state"))) == false) + { + UNIMPLEMENTEDPACKET; + } +} + +void CharServerRecv::processPincodeStatus2(Net::MessageIn &msg) +{ + pincodeManager.setSeed(msg.readUInt32("pincode seed")); + pincodeManager.setAccountId(msg.readBeingId("account id")); const uint16_t state = CAST_U16(msg.readInt16("state")); - switch (state) + pincodeManager.setPincodeLockFlag(msg.readInt16("flag") == 0); + if (pincodeManager.processPincodeStatus(state) == false) { - case 0: // pin ok - pincodeManager.pinOk(); - break; - case 1: // ask for pin - pincodeManager.setState(PincodeState::Ask); - break; - case 2: // create new pin - case 4: // create new pin? - { - pincodeManager.setState(PincodeState::Create); - break; - } - case 3: // pin must be changed - pincodeManager.setState(PincodeState::Change); - break; - case 8: // pincode was incorrect - case 5: // client show error? - pincodeManager.wrongPin(); - return; - case 6: // Unable to use your KSSN number - break; - case 7: // char select window shows a button - break; - default: - UNIMPLEMENTEDPACKET; - break; + UNIMPLEMENTEDPACKET; } - if (client) - client->updatePinState(); } void CharServerRecv::processPincodeMakeStatus(Net::MessageIn &msg) |