summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-05-01 18:02:17 +0300
committerAndrei Karas <akaras@inbox.ru>2017-05-01 18:02:17 +0300
commitbfa0ffd5db38174555992c4a21274be41aad753f (patch)
tree8fc6464790470b62d2f21cedbed2cf9e732d8d70 /src
parent87918db755040bb693cb286d8fb0bcfd97d761af (diff)
downloadplus-bfa0ffd5db38174555992c4a21274be41aad753f.tar.gz
plus-bfa0ffd5db38174555992c4a21274be41aad753f.tar.bz2
plus-bfa0ffd5db38174555992c4a21274be41aad753f.tar.xz
plus-bfa0ffd5db38174555992c4a21274be41aad753f.zip
Remove ServerFeatures haveAccountOtherGender because it always false.
Diffstat (limited to 'src')
-rw-r--r--src/gui/windows/registerdialog.cpp18
-rw-r--r--src/gui/windows/registerdialog.h1
-rw-r--r--src/net/eathena/serverfeatures.cpp5
-rw-r--r--src/net/eathena/serverfeatures.h2
-rw-r--r--src/net/serverfeatures.h2
-rw-r--r--src/net/tmwa/serverfeatures.cpp5
-rw-r--r--src/net/tmwa/serverfeatures.h2
7 files changed, 2 insertions, 33 deletions
diff --git a/src/gui/windows/registerdialog.cpp b/src/gui/windows/registerdialog.cpp
index 79884b92c..c1940eb8d 100644
--- a/src/gui/windows/registerdialog.cpp
+++ b/src/gui/windows/registerdialog.cpp
@@ -64,7 +64,6 @@ RegisterDialog::RegisterDialog(LoginData &data) :
mCancelButton(new Button(this, _("Cancel"), "cancel", this)),
mMaleButton(nullptr),
mFemaleButton(nullptr),
- mOtherButton(nullptr),
mWrongDataNoticeListener(new WrongDataNoticeListener)
{
setCloseButton(true);
@@ -94,19 +93,8 @@ RegisterDialog::RegisterDialog(LoginData &data) :
mMaleButton = new RadioButton(this, _("Male"), "sex", true);
// TRANSLATORS: register dialog. button.
mFemaleButton = new RadioButton(this, _("Female"), "sex", false);
- if (serverFeatures->haveAccountOtherGender())
- {
- // TRANSLATORS: register dialog. button.
- mOtherButton = new RadioButton(this, _("Other"), "sex", false);
- placer(0, row, mMaleButton);
- placer(1, row, mFemaleButton);
- placer(2, row, mOtherButton);
- }
- else
- {
- placer(1, row, mMaleButton);
- placer(2, row, mFemaleButton);
- }
+ placer(1, row, mMaleButton);
+ placer(2, row, mFemaleButton);
row++;
}
@@ -271,8 +259,6 @@ void RegisterDialog::action(const ActionEvent &event)
{
if (mFemaleButton && mFemaleButton->isSelected())
mLoginData->gender = Gender::FEMALE;
- else if (mOtherButton && mOtherButton->isSelected())
- mLoginData->gender = Gender::OTHER;
else
mLoginData->gender = Gender::MALE;
}
diff --git a/src/gui/windows/registerdialog.h b/src/gui/windows/registerdialog.h
index cd2ec12c2..d0d0d821a 100644
--- a/src/gui/windows/registerdialog.h
+++ b/src/gui/windows/registerdialog.h
@@ -89,7 +89,6 @@ class RegisterDialog final : public Window,
Button *mCancelButton A_NONNULLPOINTER;
RadioButton *mMaleButton;
RadioButton *mFemaleButton;
- RadioButton *mOtherButton;
WrongDataNoticeListener *mWrongDataNoticeListener A_NONNULLPOINTER;
};
diff --git a/src/net/eathena/serverfeatures.cpp b/src/net/eathena/serverfeatures.cpp
index 09e1cbb05..6bf1536fd 100644
--- a/src/net/eathena/serverfeatures.cpp
+++ b/src/net/eathena/serverfeatures.cpp
@@ -71,11 +71,6 @@ bool ServerFeatures::haveMove3() const
return serverVersion > 0;
}
-bool ServerFeatures::haveAccountOtherGender() const
-{
- return false;
-}
-
bool ServerFeatures::haveCharOtherGender() const
{
return true;
diff --git a/src/net/eathena/serverfeatures.h b/src/net/eathena/serverfeatures.h
index dc057c35b..df603863d 100644
--- a/src/net/eathena/serverfeatures.h
+++ b/src/net/eathena/serverfeatures.h
@@ -48,8 +48,6 @@ class ServerFeatures final : public Net::ServerFeatures
bool haveMove3() const override final;
- bool haveAccountOtherGender() const override final A_CONST;
-
bool haveCharOtherGender() const override final;
bool haveMonsterAttackRange() const override final A_CONST;
diff --git a/src/net/serverfeatures.h b/src/net/serverfeatures.h
index 7fdaccbcd..f211e3ea9 100644
--- a/src/net/serverfeatures.h
+++ b/src/net/serverfeatures.h
@@ -50,8 +50,6 @@ class ServerFeatures notfinal
virtual bool haveMove3() const = 0;
- virtual bool haveAccountOtherGender() const = 0;
-
virtual bool haveCharOtherGender() const = 0;
virtual bool haveMonsterAttackRange() const = 0;
diff --git a/src/net/tmwa/serverfeatures.cpp b/src/net/tmwa/serverfeatures.cpp
index c56b2f31b..d0221d383 100644
--- a/src/net/tmwa/serverfeatures.cpp
+++ b/src/net/tmwa/serverfeatures.cpp
@@ -69,11 +69,6 @@ bool ServerFeatures::haveMove3() const
return tmwServerVersion >= 0x0f0512 && tmwServerVersion <= 0xf0706;
}
-bool ServerFeatures::haveAccountOtherGender() const
-{
- return false;
-}
-
bool ServerFeatures::haveCharOtherGender() const
{
return tmwServerVersion > 0x0f0b17;
diff --git a/src/net/tmwa/serverfeatures.h b/src/net/tmwa/serverfeatures.h
index fbe89e505..1e91d6831 100644
--- a/src/net/tmwa/serverfeatures.h
+++ b/src/net/tmwa/serverfeatures.h
@@ -48,8 +48,6 @@ class ServerFeatures final : public Net::ServerFeatures
bool haveMove3() const override final;
- bool haveAccountOtherGender() const override final A_CONST;
-
bool haveCharOtherGender() const override final;
bool haveMonsterAttackRange() const override final;