summaryrefslogtreecommitdiff
path: root/src/net/eathena/charserverhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-31 16:53:06 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-06 01:18:54 +0300
commit8ad8da325107ef1b33bd6c3ed985859e7edb78ae (patch)
tree3dd76adef5e6dbe7da8db925ffa42ebbf21eb638 /src/net/eathena/charserverhandler.cpp
parent8cc52b6e9cf46643cc6300df844e70b8dcb85212 (diff)
downloadmanaplus-8ad8da325107ef1b33bd6c3ed985859e7edb78ae.tar.gz
manaplus-8ad8da325107ef1b33bd6c3ed985859e7edb78ae.tar.bz2
manaplus-8ad8da325107ef1b33bd6c3ed985859e7edb78ae.tar.xz
manaplus-8ad8da325107ef1b33bd6c3ed985859e7edb78ae.zip
add basic implimentation for set pincode.
For now it not sending pincode to server.
Diffstat (limited to 'src/net/eathena/charserverhandler.cpp')
-rw-r--r--src/net/eathena/charserverhandler.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp
index af3c012dd..7d6e2e74c 100644
--- a/src/net/eathena/charserverhandler.cpp
+++ b/src/net/eathena/charserverhandler.cpp
@@ -28,6 +28,8 @@
#include "being/attributes.h"
+#include "gui/windows/editdialog.h"
+
#include "net/character.h"
#include "net/logindata.h"
#include "net/net.h"
@@ -45,6 +47,9 @@
#include "resources/db/itemdb.h"
#include "utils/dtor.h"
+#include "utils/gettext.h"
+
+#include "listeners/pincodelistener.h"
#include "debug.h"
@@ -58,7 +63,9 @@ extern ServerInfo mapServer;
CharServerHandler::CharServerHandler() :
MessageHandler(),
- Ea::CharServerHandler()
+ Ea::CharServerHandler(),
+ mPinSeed(0),
+ mNeedCreatePin(false)
{
static const uint16_t _messages[] =
{
@@ -378,7 +385,7 @@ void CharServerHandler::processChangeMapServer(Net::MessageIn &msg)
void CharServerHandler::processPincodeStatus(Net::MessageIn &msg)
{
- msg.readInt32("pincode seed");
+ const uint32_t seed = msg.readInt32("pincode seed");
msg.readInt32("account id");
const uint16_t state = static_cast<uint16_t>(msg.readInt16("state"));
switch (state)
@@ -388,11 +395,14 @@ void CharServerHandler::processPincodeStatus(Net::MessageIn &msg)
case 1: // ask for pin
break;
case 2: // create new pin
+ case 4: // create new pin?
+ {
+ mPinSeed = seed;
+ mNeedCreatePin = true;
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