summaryrefslogtreecommitdiff
path: root/src/gui/char_select.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2005-09-26 19:38:02 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2005-09-26 19:38:02 +0000
commit5f078fc572eb28d9a62a288e7f708d66ec0fc910 (patch)
treea8f53c9a5bfe49c0382ce57968c2842ba1ea480c /src/gui/char_select.cpp
parent1e67cb01df788e02c7b248bb22b144d3d8b76cef (diff)
downloadmana-client-5f078fc572eb28d9a62a288e7f708d66ec0fc910.tar.gz
mana-client-5f078fc572eb28d9a62a288e7f708d66ec0fc910.tar.bz2
mana-client-5f078fc572eb28d9a62a288e7f708d66ec0fc910.tar.xz
mana-client-5f078fc572eb28d9a62a288e7f708d66ec0fc910.zip
Now error message is displayed properly when the map server is offline.
Diffstat (limited to 'src/gui/char_select.cpp')
-rw-r--r--src/gui/char_select.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp
index fd0ccdc9..f6fa3a1a 100644
--- a/src/gui/char_select.cpp
+++ b/src/gui/char_select.cpp
@@ -252,14 +252,13 @@ void CharSelectDialog::serverCharSelect()
{
switch (msg.readByte()) {
case 0:
- new OkDialog(this, "Error", "Access denied");
+ errorMessage = "Access denied";
break;
case 1:
- new OkDialog(this, "Error", "Cannot use this ID");
+ errorMessage = "Cannot use this ID";
break;
default:
- new OkDialog(this, "Error",
- "Unknown failure to select character");
+ errorMessage = "Unknown failure to select character");
break;
}
skip(msg.getLength());
@@ -267,18 +266,21 @@ void CharSelectDialog::serverCharSelect()
else if (msg.getId() == 0x0081)
{
switch (msg.readByte()) {
+ case 1:
+ errorMessage = "Map server offline";
+ break;
case 3:
- new OkDialog(this, "Error", "Speed hack detected");
+ errorMessage = "Speed hack detected";
break;
case 8:
- new OkDialog(this, "Error", "Duplicated login");
+ errorMessage = "Duplicated login";
break;
default:
- new OkDialog(this, "Error", "Unkown error with 0x0081");
+ errorMessage = "Unkown error with 0x0081";
break;
}
close_session();
- state = LOGIN_STATE;
+ state = ERROR_STATE;
}
// Todo: add other packets