summaryrefslogtreecommitdiff
path: root/src/net/tmwa
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/tmwa')
-rw-r--r--src/net/tmwa/charserverhandler.cpp17
-rw-r--r--src/net/tmwa/charserverhandler.h2
2 files changed, 19 insertions, 0 deletions
diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp
index 34885f7e7..2412a094d 100644
--- a/src/net/tmwa/charserverhandler.cpp
+++ b/src/net/tmwa/charserverhandler.cpp
@@ -28,7 +28,10 @@
#include "being/attributes.h"
+#include "gui/dialogtype.h"
+
#include "gui/windows/charcreatedialog.h"
+#include "gui/windows/okdialog.h"
#include "net/character.h"
#include "net/logindata.h"
@@ -521,4 +524,18 @@ void CharServerHandler::changeSlot(const int oldSlot A_UNUSED,
{
}
+void CharServerHandler::processCharDeleteFailed(Net::MessageIn &msg A_UNUSED)
+{
+ BLOCK_START("CharServerHandler::processCharDeleteFailed")
+ unlockCharSelectDialog();
+ msg.readUInt8("error");
+ // TRANSLATORS: error message
+ new OkDialog(_("Error"), _("Failed to delete character."),
+ // TRANSLATORS: ok dialog button
+ _("OK"),
+ DialogType::ERROR,
+ true, true, nullptr, 260);
+ BLOCK_END("CharServerHandler::processCharDeleteFailed")
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/charserverhandler.h b/src/net/tmwa/charserverhandler.h
index cf82580f8..ab513d0d2 100644
--- a/src/net/tmwa/charserverhandler.h
+++ b/src/net/tmwa/charserverhandler.h
@@ -90,6 +90,8 @@ class CharServerHandler final : public MessageHandler,
static void processCharCreate(Net::MessageIn &msg);
static void processCharCreate2(Net::MessageIn &msg);
+
+ static void processCharDeleteFailed(Net::MessageIn &msg);
};
} // namespace TmwAthena