summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-07-14 00:49:40 +0300
committerAndrei Karas <akaras@inbox.ru>2018-07-14 00:49:40 +0300
commitacd87806b767d70c0676c0f800e23a7ce4f623e0 (patch)
tree3929d2c0e19d4abe9db62943816a156e7472eb19 /src/net/eathena
parenta14077ce17133d7a7e12a747c067c07deca1c1f7 (diff)
downloadplus-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')
-rw-r--r--src/net/eathena/charserverrecv.cpp44
-rw-r--r--src/net/eathena/charserverrecv.h1
-rw-r--r--src/net/eathena/packetsin.inc20
3 files changed, 35 insertions, 30 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)
diff --git a/src/net/eathena/charserverrecv.h b/src/net/eathena/charserverrecv.h
index 5b776f82d..78092d3dd 100644
--- a/src/net/eathena/charserverrecv.h
+++ b/src/net/eathena/charserverrecv.h
@@ -44,6 +44,7 @@ namespace EAthena
void readPlayerData(Net::MessageIn &msg,
Net::Character *const character);
void processPincodeStatus(Net::MessageIn &msg);
+ void processPincodeStatus2(Net::MessageIn &msg);
void processPincodeMakeStatus(Net::MessageIn &msg);
void processPincodeEditStatus(Net::MessageIn &msg);
void processCharLogin2(Net::MessageIn &msg);
diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc
index 83d30570a..8fa74e371 100644
--- a/src/net/eathena/packetsin.inc
+++ b/src/net/eathena/packetsin.inc
@@ -1037,6 +1037,24 @@ if (packetVersion >= 20171207)
packet(SMSG_PARTY_INFO, 0x0ae5, -1, &PartyRecv::processPartyInfo, 20171207);
}
+// main 20180124
+if (packetVersionMain >= 20180124)
+{
+ packet(SMSG_CHAR_PINCODE_STATUS2, 0x0ae9, 13, &CharServerRecv::processPincodeStatus2, 20180124);
+}
+
+// re 20180124
+if (packetVersionRe >= 20180124)
+{
+ packet(SMSG_CHAR_PINCODE_STATUS2, 0x0ae9, 13, &CharServerRecv::processPincodeStatus2, 20180124);
+}
+
+// zero 20180131
+if (packetVersionZero >= 20180131)
+{
+ packet(SMSG_CHAR_PINCODE_STATUS2, 0x0ae9, 13, &CharServerRecv::processPincodeStatus2, 20180124);
+}
+
// re 20180221
if (packetVersionRe >= 20180221)
{
@@ -1081,7 +1099,7 @@ if (packetVersionZero >= 20180411)
}
// 20180418
-if (packetVersion == 20180418)
+if (packetVersion >= 20180418)
{
packet(SMSG_ITEM_DROPPED, 0x0add, 22, &ItemRecv::processItemDropped, 20180418);
}