From 1e0e3d54319f14859c09e41cb7ae640f76d41f1e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 11 Jan 2011 23:18:20 +0200 Subject: Add new error codes for creating char. --- src/net/tmwa/charserverhandler.cpp | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp index 4bf9df8b3..bda67da21 100644 --- a/src/net/tmwa/charserverhandler.cpp +++ b/src/net/tmwa/charserverhandler.cpp @@ -134,8 +134,28 @@ void CharServerHandler::handleMessage(Net::MessageIn &msg) break; case SMSG_CHAR_CREATE_FAILED: - new OkDialog(_("Error"), _("Failed to create character. Most " - "likely the name is already taken.")); + switch (msg.readInt8()) + { + case 1: + case 0: + default: + errorMessage = _("Failed to create character. Most " + "likely the name is already taken."); + break; + case 2: + errorMessage = _("Wrong name."); + break; + case 3: + errorMessage = _("Incorrect stats."); + break; + case 4: + errorMessage = _("Incorrect hair."); + break; + case 5: + errorMessage = _("Incorrect slot."); + break; + } + new OkDialog(_("Error"), errorMessage); if (mCharCreateDialog) mCharCreateDialog->unlock(); break; -- cgit v1.2.3-70-g09d2