summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-01-11 23:18:20 +0200
committerAndrei Karas <akaras@inbox.ru>2011-01-12 01:48:37 +0200
commit1e0e3d54319f14859c09e41cb7ae640f76d41f1e (patch)
treef917d4ee846fc51af8be17e907d841ec867ae631
parent0e879111547b58ea0e05fefcbb6636bed4374589 (diff)
downloadmv-1e0e3d54319f14859c09e41cb7ae640f76d41f1e.tar.gz
mv-1e0e3d54319f14859c09e41cb7ae640f76d41f1e.tar.bz2
mv-1e0e3d54319f14859c09e41cb7ae640f76d41f1e.tar.xz
mv-1e0e3d54319f14859c09e41cb7ae640f76d41f1e.zip
Add new error codes for creating char.
-rw-r--r--src/net/tmwa/charserverhandler.cpp24
1 files 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;