summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
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: