diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-31 16:05:40 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-06 01:18:54 +0300 |
commit | 8cc52b6e9cf46643cc6300df844e70b8dcb85212 (patch) | |
tree | 8b212cf00bb29b0022eb7dc45ffb5d9039444063 /src/net/eathena/charserverhandler.cpp | |
parent | 1111fdbeb39d01e7612e164512fecf4289569b10 (diff) | |
download | plus-8cc52b6e9cf46643cc6300df844e70b8dcb85212.tar.gz plus-8cc52b6e9cf46643cc6300df844e70b8dcb85212.tar.bz2 plus-8cc52b6e9cf46643cc6300df844e70b8dcb85212.tar.xz plus-8cc52b6e9cf46643cc6300df844e70b8dcb85212.zip |
eathena: add basic handling for packet SMSG_CHAR_PINCODE_STATUS 0x08b9.
Diffstat (limited to 'src/net/eathena/charserverhandler.cpp')
-rw-r--r-- | src/net/eathena/charserverhandler.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp index 3dd5134e0..af3c012dd 100644 --- a/src/net/eathena/charserverhandler.cpp +++ b/src/net/eathena/charserverhandler.cpp @@ -71,6 +71,7 @@ CharServerHandler::CharServerHandler() : SMSG_CHAR_DELETE_FAILED, SMSG_CHAR_MAP_INFO, SMSG_CHANGE_MAP_SERVER, + SMSG_CHAR_PINCODE_STATUS, 0 }; handledMessages = _messages; @@ -114,6 +115,10 @@ void CharServerHandler::handleMessage(Net::MessageIn &msg) processChangeMapServer(msg); break; + case SMSG_CHAR_PINCODE_STATUS: + processPincodeStatus(msg); + break; + default: break; } @@ -371,4 +376,36 @@ void CharServerHandler::processChangeMapServer(Net::MessageIn &msg) BLOCK_END("CharServerHandler::processChangeMapServer") } +void CharServerHandler::processPincodeStatus(Net::MessageIn &msg) +{ + msg.readInt32("pincode seed"); + msg.readInt32("account id"); + const uint16_t state = static_cast<uint16_t>(msg.readInt16("state")); + switch (state) + { + case 0: // pin ok + break; + case 1: // ask for pin + break; + case 2: // create new pin + break; + case 3: // pin must be changed + break; + case 4: // create new pin? + break; + case 5: // client show error? + break; + case 6: // Unable to use your KSSN number + break; + case 7: // char select window shows a button + break; + case 8: // pincode was incorrect + break; + default: + logger->log("processPincodeStatus: unknown pin state: %d", + static_cast<int>(state)); + break; + } +} + } // namespace EAthena |