summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-06-24 19:34:08 +0300
committerAndrei Karas <akaras@inbox.ru>2012-06-24 21:41:20 +0300
commit3b537e109df901df3da4c706f827c8d3d39a7238 (patch)
treeae5a83f71954aaeb45ce3f8d609e6f4a8dc0678c /src/gui
parent4ef35e9ef757da1db724c5d784048601144c934c (diff)
downloadmv-3b537e109df901df3da4c706f827c8d3d39a7238.tar.gz
mv-3b537e109df901df3da4c706f827c8d3d39a7238.tar.bz2
mv-3b537e109df901df3da4c706f827c8d3d39a7238.tar.xz
mv-3b537e109df901df3da4c706f827c8d3d39a7238.zip
Add basic support for eathena stable.
Can register, create char, connect to map server and get map info.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/editserverdialog.cpp31
-rw-r--r--src/gui/editserverdialog.h8
-rw-r--r--src/gui/serverdialog.cpp13
3 files changed, 52 insertions, 0 deletions
diff --git a/src/gui/editserverdialog.cpp b/src/gui/editserverdialog.cpp
index b52559ecc..0a8c3e816 100644
--- a/src/gui/editserverdialog.cpp
+++ b/src/gui/editserverdialog.cpp
@@ -43,10 +43,19 @@ std::string TypeListModel::getElementAt(int elementIndex)
return "TmwAthena";
else if (elementIndex == 1)
return "Evol";
+#ifdef EATHENA_SUPPORT
+ else if (elementIndex == 2)
+ return "eAthena";
+#ifdef MANASERV_SUPPORT
+ else if (elementIndex == 3)
+ return "ManaServ";
+#endif
+#else
#ifdef MANASERV_SUPPORT
else if (elementIndex == 2)
return "ManaServ";
#endif
+#endif
else
return "Unknown";
}
@@ -129,11 +138,22 @@ EditServerDialog::EditServerDialog(ServerDialog *parent, ServerInfo server,
switch (mServer.type)
{
+#ifdef EATHENA_SUPPORT
+ case ServerInfo::EATHENA:
+ mTypeField->setSelected(2);
+ break;
+ case ServerInfo::MANASERV:
+#ifdef MANASERV_SUPPORT
+ mTypeField->setSelected(3);
+ break;
+#endif
+#else
case ServerInfo::MANASERV:
#ifdef MANASERV_SUPPORT
mTypeField->setSelected(2);
break;
#endif
+#endif
default:
case ServerInfo::UNKNOWN:
case ServerInfo::TMWATHENA:
@@ -199,11 +219,22 @@ void EditServerDialog::action(const gcn::ActionEvent &event)
case 1:
mServer.type = ServerInfo::EVOL;
break;
+#ifdef EATHENA_SUPPORT
+ case 2:
+ mServer.type = ServerInfo::EATHENA;
+ break;
+#ifdef MANASERV_SUPPORT
+ case 3:
+ mServer.type = ServerInfo::MANASERV;
+ break;
+#endif
+#else
#ifdef MANASERV_SUPPORT
case 2:
mServer.type = ServerInfo::MANASERV;
break;
#endif
+#endif
default:
mServer.type = ServerInfo::UNKNOWN;
}
diff --git a/src/gui/editserverdialog.h b/src/gui/editserverdialog.h
index 4ad6b8fcb..5f7b4318d 100644
--- a/src/gui/editserverdialog.h
+++ b/src/gui/editserverdialog.h
@@ -51,11 +51,19 @@ class TypeListModel : public gcn::ListModel
* Used to get number of line in the list
*/
int getNumberOfElements()
+#ifdef EATHENA_SUPPORT
+#ifdef MANASERV_SUPPORT
+ { return 4; }
+#else
+ { return 3; }
+#endif
+#else
#ifdef MANASERV_SUPPORT
{ return 3; }
#else
{ return 2; }
#endif
+#endif
/**
* Used to get an element from the list
diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp
index c2045effa..a0cfda292 100644
--- a/src/gui/serverdialog.cpp
+++ b/src/gui/serverdialog.cpp
@@ -71,12 +71,19 @@ static std::string serverTypeToString(ServerInfo::Type type)
return "TmwAthena";
case ServerInfo::EVOL:
return "Evol";
+#ifdef EATHENA_SUPPORT
+ case ServerInfo::EATHENA:
+ return "eAthena";
+#endif
#ifdef MANASERV_SUPPORT
case ServerInfo::MANASERV:
return "ManaServ";
#else
case ServerInfo::MANASERV:
#endif
+#ifndef EATHENA_SUPPORT
+ case ServerInfo::EATHENA:
+#endif
default:
case ServerInfo::UNKNOWN:
return "";
@@ -88,6 +95,12 @@ static unsigned short defaultPortForServerType(ServerInfo::Type type)
switch (type)
{
default:
+ case ServerInfo::EATHENA:
+#ifdef EATHENA_SUPPORT
+ return 6900;
+#else
+ return 6901;
+#endif
case ServerInfo::UNKNOWN:
case ServerInfo::TMWATHENA:
case ServerInfo::EVOL: