From 676c5e978cbb312fbf4df8ec396c0f8b08944a96 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 8 Mar 2018 01:35:19 +0300 Subject: Add support for enter auth pincode. --- src/net/charserverhandler.h | 3 +++ src/net/eathena/charserverhandler.cpp | 8 ++++++++ src/net/eathena/charserverhandler.h | 3 +++ src/net/tmwa/charserverhandler.h | 5 +++++ 4 files changed, 19 insertions(+) (limited to 'src/net') diff --git a/src/net/charserverhandler.h b/src/net/charserverhandler.h index 56728a58f..fdf744cc4 100644 --- a/src/net/charserverhandler.h +++ b/src/net/charserverhandler.h @@ -90,6 +90,9 @@ class CharServerHandler notfinal virtual void setNewPincode(const BeingId accountId, const std::string &pin) const = 0; + virtual void sendCheckPincode(const BeingId accountId, + const std::string &pin) const = 0; + virtual void changeSlot(const int oldSlot, const int newSlot) const = 0; diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp index a62c79c3b..71bf6aeee 100644 --- a/src/net/eathena/charserverhandler.cpp +++ b/src/net/eathena/charserverhandler.cpp @@ -206,6 +206,14 @@ void CharServerHandler::setNewPincode(const BeingId accountId, outMsg.writeString(pin, 4, "encrypted pin"); } +void CharServerHandler::sendCheckPincode(const BeingId accountId, + const std::string &pin) const +{ + createOutPacket(CMSG_CHAR_PIN_CHECK); + outMsg.writeBeingId(accountId, "account id"); + outMsg.writeString(pin, 4, "encrypted pin"); +} + void CharServerHandler::renameCharacter(const BeingId id, const std::string &newName) const { diff --git a/src/net/eathena/charserverhandler.h b/src/net/eathena/charserverhandler.h index 9e02dce1f..f41b14a79 100644 --- a/src/net/eathena/charserverhandler.h +++ b/src/net/eathena/charserverhandler.h @@ -65,6 +65,9 @@ class CharServerHandler final : public Ea::CharServerHandler void setNewPincode(const BeingId accountId, const std::string &pin) const override final; + void sendCheckPincode(const BeingId accountId, + const std::string &pin) const override final; + /** * Sets the character create dialog. The handler will clean up this * dialog when a new character is successfully created, and will unlock diff --git a/src/net/tmwa/charserverhandler.h b/src/net/tmwa/charserverhandler.h index 51bf08b84..37e71744e 100644 --- a/src/net/tmwa/charserverhandler.h +++ b/src/net/tmwa/charserverhandler.h @@ -67,6 +67,11 @@ class CharServerHandler final : public Ea::CharServerHandler override final { } + void sendCheckPincode(const BeingId accountId A_UNUSED, + const std::string &pin A_UNUSED) const + override final + { } + /** * Sets the character create dialog. The handler will clean up this * dialog when a new character is successfully created, and will unlock -- cgit v1.2.3-60-g2f50