summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorasuratva <asuratva@proton.me>2025-06-25 16:16:33 +0000
committerFedja Beader <fedja@protonmail.ch>2025-06-25 16:16:33 +0000
commitd48d7748634bef2119c7712cdbfb91f834f96a30 (patch)
tree3951cf73dc33f64f7d02141487deda996c568c06
parent1eb25d889d82368fbb35d569c84893a2ec68658f (diff)
downloadmanaplus-d48d7748634bef2119c7712cdbfb91f834f96a30.tar.gz
manaplus-d48d7748634bef2119c7712cdbfb91f834f96a30.tar.bz2
manaplus-d48d7748634bef2119c7712cdbfb91f834f96a30.tar.xz
manaplus-d48d7748634bef2119c7712cdbfb91f834f96a30.zip
Change char deletion to require confirming username instead of password. Causes Launcher issues otherwise.
When playing from Launcher, the a/c password gets reset to some random string. Deleting character (specifically on TMW) requires password for confirmation, which player no longer has easy access to. This changes character deletion to require confirming username instead of password. Squashed with: * Change to confirm character name instead of username when deleting * change text 'password' to 'username' in error dialog. **** mana/plus!194
-rw-r--r--src/gui/windows/charselectdialog.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp
index 658da0455..70bcbcf74 100644
--- a/src/gui/windows/charselectdialog.cpp
+++ b/src/gui/windows/charselectdialog.cpp
@@ -307,12 +307,16 @@ void CharSelectDialog::action(const ActionEvent &event)
return;
if ((mDeleteDialog != nullptr) && mDeleteIndex != -1)
{
+ const Net::Character *const character
+ = mCharacterEntries[mDeleteIndex]->getCharacter();
if (serverFeatures->haveEmailOnDelete())
{
attemptCharacterDelete(mDeleteIndex, mDeleteDialog->getText());
mDeleteDialog = nullptr;
}
- else if (mDeleteDialog->getText() == LoginDialog::savedPassword)
+ else if (character != nullptr &&
+ character->dummy != nullptr &&
+ mDeleteDialog->getText() == character->dummy->getName())
{
attemptCharacterDelete(mDeleteIndex, "");
mDeleteDialog = nullptr;
@@ -323,7 +327,7 @@ void CharSelectDialog::action(const ActionEvent &event)
// TRANSLATORS: error header
_("Error"),
// TRANSLATORS: error message
- _("Incorrect password"),
+ _("Incorrect character name"),
// TRANSLATORS: ok dialog button
_("OK"),
DialogType::ERROR,
@@ -497,9 +501,9 @@ void CharSelectDialog::askPasswordForDeletion(const int index)
{
CREATEWIDGETV(mDeleteDialog, TextDialog,
// TRANSLATORS: char deletion question.
- _("Enter password for deleting character"),
+ _("Enter character name to confirm deleting the character"),
// TRANSLATORS: email label.
- _("Enter password:"),
+ _("Enter character name:"),
this,
true);
}