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 | |
parent | 1111fdbeb39d01e7612e164512fecf4289569b10 (diff) | |
download | manaverse-8cc52b6e9cf46643cc6300df844e70b8dcb85212.tar.gz manaverse-8cc52b6e9cf46643cc6300df844e70b8dcb85212.tar.bz2 manaverse-8cc52b6e9cf46643cc6300df844e70b8dcb85212.tar.xz manaverse-8cc52b6e9cf46643cc6300df844e70b8dcb85212.zip |
eathena: add basic handling for packet SMSG_CHAR_PINCODE_STATUS 0x08b9.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/eathena/charserverhandler.cpp | 37 | ||||
-rw-r--r-- | src/net/eathena/charserverhandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/packets.h | 2 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 1 |
4 files changed, 41 insertions, 1 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 diff --git a/src/net/eathena/charserverhandler.h b/src/net/eathena/charserverhandler.h index 6da7e32fe..9a58a50e7 100644 --- a/src/net/eathena/charserverhandler.h +++ b/src/net/eathena/charserverhandler.h @@ -67,6 +67,8 @@ class CharServerHandler final : public MessageHandler, void readPlayerData(Net::MessageIn &msg, Net::Character *const character, const bool) const override final; + + void processPincodeStatus(Net::MessageIn &msg); }; } // namespace EAthena diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h index dd5994fd1..72ae89dfe 100644 --- a/src/net/eathena/packets.h +++ b/src/net/eathena/packets.h @@ -228,7 +228,7 @@ int16_t packet_lengths[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, // #0x08C0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 3251c5faf..a716d8a6e 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -44,6 +44,7 @@ #define SMSG_CHAR_LOGIN_ERROR 0x006c #define SMSG_CHAR_CREATE_SUCCEEDED 0x006d #define SMSG_CHAR_CREATE_SUCCEEDED2 0x0221 +#define SMSG_CHAR_PINCODE_STATUS 0x08b9 #define SMSG_CHAR_CREATE_FAILED 0x006e #define SMSG_CHAR_DELETE_SUCCEEDED 0x006f |