summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-12-14 02:58:34 +0300
committerAndrei Karas <akaras@inbox.ru>2011-12-14 02:58:34 +0300
commitc3c14c092bf1038d766dd969561a83515554d844 (patch)
tree340d986acd77fa4a6571f6976a831ccc693e851f /src
parent386650285cecf90a0b77ac3dd5e3548148ca9182 (diff)
downloadplus-c3c14c092bf1038d766dd969561a83515554d844.tar.gz
plus-c3c14c092bf1038d766dd969561a83515554d844.tar.bz2
plus-c3c14c092bf1038d766dd969561a83515554d844.tar.xz
plus-c3c14c092bf1038d766dd969561a83515554d844.zip
Add last login time to char selection dialog.
Diffstat (limited to 'src')
-rw-r--r--src/gui/charselectdialog.cpp2
-rw-r--r--src/gui/charselectdialog.h1
-rw-r--r--src/net/ea/loginhandler.cpp6
-rw-r--r--src/net/logindata.h2
4 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/charselectdialog.cpp b/src/gui/charselectdialog.cpp
index 15d1e6e0e..401c9ae33 100644
--- a/src/gui/charselectdialog.cpp
+++ b/src/gui/charselectdialog.cpp
@@ -135,6 +135,7 @@ CharSelectDialog::CharSelectDialog(LoginData *data):
setCloseButton(false);
mAccountNameLabel = new Label(mLoginData->username);
+ mLastLoginLabel = new Label(mLoginData->lastLogin);
mSwitchLoginButton = new Button(_("Switch Login"), "switch", this);
mChangePasswordButton = new Button(_("Change Password"), "change_password",
this);
@@ -145,6 +146,7 @@ CharSelectDialog::CharSelectDialog(LoginData *data):
placer = getPlacer(0, 0);
placer(0, 0, mAccountNameLabel, 2);
+ placer(2, 0, mLastLoginLabel);
placer(0, 1, mSwitchLoginButton);
if (optionalActions & Net::LoginHandler::Unregister)
diff --git a/src/gui/charselectdialog.h b/src/gui/charselectdialog.h
index 0dfe90733..9ebab0126 100644
--- a/src/gui/charselectdialog.h
+++ b/src/gui/charselectdialog.h
@@ -100,6 +100,7 @@ class CharSelectDialog : public Window, public gcn::ActionListener,
bool mLocked;
gcn::Label *mAccountNameLabel;
+ gcn::Label *mLastLoginLabel;
gcn::Button *mSwitchLoginButton;
gcn::Button *mChangePasswordButton;
diff --git a/src/net/ea/loginhandler.cpp b/src/net/ea/loginhandler.cpp
index b11e60d4d..420236cfd 100644
--- a/src/net/ea/loginhandler.cpp
+++ b/src/net/ea/loginhandler.cpp
@@ -168,7 +168,11 @@ void LoginHandler::processLoginData(Net::MessageIn &msg)
mToken.session_ID1 = msg.readInt32();
mToken.account_ID = msg.readInt32();
mToken.session_ID2 = msg.readInt32();
- msg.skip(30); // unknown
+ msg.skip(4); // old ip
+ loginData.lastLogin = msg.readString(24);
+ msg.skip(2); // unused bytes
+
+// msg.skip(30); // unknown
// reserve bits for future usage
mToken.sex = (msg.readInt8() & 1) ? GENDER_MALE : GENDER_FEMALE;
diff --git a/src/net/logindata.h b/src/net/logindata.h
index 647a04abf..6433d2759 100644
--- a/src/net/logindata.h
+++ b/src/net/logindata.h
@@ -59,6 +59,7 @@ class LoginData
std::string password;
std::string newPassword;
std::string updateHost;
+ std::string lastLogin;
int updateType;
std::string email;
@@ -82,6 +83,7 @@ class LoginData
email.clear();
captchaResponse.clear();
gender = GENDER_UNSPECIFIED;
+ lastLogin.clear();
resetCharacterSlots();
}
/**