diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2009-10-04 00:36:46 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2009-10-04 00:36:46 +0200 |
commit | eb22b66b0821e49ed550d30d20d9db5af535e6a3 (patch) | |
tree | a54ee9996bf235741f95945fd81be99a6e686eca /src/net | |
parent | 076bcc1f8361c705d7dbe9088b18cca7d7fe21de (diff) | |
download | mana-eb22b66b0821e49ed550d30d20d9db5af535e6a3.tar.gz mana-eb22b66b0821e49ed550d30d20d9db5af535e6a3.tar.bz2 mana-eb22b66b0821e49ed550d30d20d9db5af535e6a3.tar.xz mana-eb22b66b0821e49ed550d30d20d9db5af535e6a3.zip |
Replaced setNetworkOptions with LoginHandler::supportedOptionalActions
Better to ask when needed that rely on static booleans to be set from
somewhere. Also tried to fix the layouting a bit, but it's still not
perfect.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/charhandler.h | 4 | ||||
-rw-r--r-- | src/net/ea/generalhandler.cpp | 1 | ||||
-rw-r--r-- | src/net/ea/loginhandler.h | 3 | ||||
-rw-r--r-- | src/net/loginhandler.h | 7 | ||||
-rw-r--r-- | src/net/tmwserv/generalhandler.cpp | 3 | ||||
-rw-r--r-- | src/net/tmwserv/loginhandler.h | 3 |
6 files changed, 17 insertions, 4 deletions
diff --git a/src/net/charhandler.h b/src/net/charhandler.h index 9ca36a9f..ac235df5 100644 --- a/src/net/charhandler.h +++ b/src/net/charhandler.h @@ -33,6 +33,7 @@ class CharCreateDialog; class LocalPlayer; namespace Net { + class CharHandler { public: @@ -50,6 +51,7 @@ class CharHandler virtual void deleteCharacter(int slot, LocalPlayer* character) = 0; }; -} + +} // namespace Net #endif // CHARHANDLER_H diff --git a/src/net/ea/generalhandler.cpp b/src/net/ea/generalhandler.cpp index 46a115ff..692ebec0 100644 --- a/src/net/ea/generalhandler.cpp +++ b/src/net/ea/generalhandler.cpp @@ -103,7 +103,6 @@ GeneralHandler::GeneralHandler(): ItemDB::setStatsList(stats); - CharSelectDialog::setNetworkOptions(false, false); RegisterDialog::setEmail(NULL); RegisterDialog::setGender(&netToken.sex); } diff --git a/src/net/ea/loginhandler.h b/src/net/ea/loginhandler.h index bc1aa816..780aa832 100644 --- a/src/net/ea/loginhandler.h +++ b/src/net/ea/loginhandler.h @@ -46,6 +46,9 @@ class LoginHandler : public MessageHandler, public Net::LoginHandler void disconnect(); + int supportedOptionalActions() const + { return 0; } + void loginAccount(LoginData *loginData); void changeEmail(const std::string &email); diff --git a/src/net/loginhandler.h b/src/net/loginhandler.h index 26dfb53b..5274bbea 100644 --- a/src/net/loginhandler.h +++ b/src/net/loginhandler.h @@ -35,6 +35,11 @@ namespace Net { class LoginHandler { public: + enum OptionalAction { + Unregister = 0x1, + ChangeEmail = 0x2 + }; + virtual void setServer(const ServerInfo &server) { mServer = server; } @@ -47,6 +52,8 @@ class LoginHandler virtual void disconnect() = 0; + virtual int supportedOptionalActions() const = 0; + virtual void loginAccount(LoginData *loginData) = 0; virtual void changeEmail(const std::string &email) = 0; diff --git a/src/net/tmwserv/generalhandler.cpp b/src/net/tmwserv/generalhandler.cpp index ede20ff0..0f4b5109 100644 --- a/src/net/tmwserv/generalhandler.cpp +++ b/src/net/tmwserv/generalhandler.cpp @@ -102,9 +102,8 @@ GeneralHandler::GeneralHandler(): stats.push_back(ItemDB::Stat("will", N_("Willpower %+d"))); ItemDB::setStatsList(stats); - + ChangeEmailDialog::setEmail(&userEmail); - CharSelectDialog::setNetworkOptions(true, true); RegisterDialog::setEmail(&userEmail); RegisterDialog::setGender(NULL); } diff --git a/src/net/tmwserv/loginhandler.h b/src/net/tmwserv/loginhandler.h index 50b3d8c7..754fa71b 100644 --- a/src/net/tmwserv/loginhandler.h +++ b/src/net/tmwserv/loginhandler.h @@ -44,6 +44,9 @@ class LoginHandler : public MessageHandler, public Net::LoginHandler void disconnect(); + int supportedOptionalActions() const + { return Unregister | ChangeEmail; } + void loginAccount(LoginData *loginData); void changeEmail(const std::string &email); |