From c61f1b6abe8e68995f00ae3a939afe5049e5cdb3 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 27 Feb 2014 13:25:41 +0300 Subject: Remove manaserv ifdefs code. ManaServ was already depricated long ago. --- src/gui/windows/charcreatedialog.cpp | 13 +------------ src/gui/windows/charselectdialog.cpp | 7 ------- src/gui/windows/editserverdialog.cpp | 23 +---------------------- src/gui/windows/selldialog.cpp | 10 ---------- src/gui/windows/serverdialog.cpp | 20 ++------------------ 5 files changed, 4 insertions(+), 69 deletions(-) (limited to 'src/gui/windows') diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp index 4f98cb931..a877f45e0 100644 --- a/src/gui/windows/charcreatedialog.cpp +++ b/src/gui/windows/charcreatedialog.cpp @@ -325,11 +325,7 @@ void CharCreateDialog::action(const ActionEvent &event) const std::string id = event.getId(); if (id == "create") { - if ( -#ifdef MANASERV_SUPPORT - Net::getNetworkType() == ServerInfo::MANASERV || -#endif - getName().length() >= 4) + if (getName().length() >= 4) { // Attempt to create the character mCreateButton->setEnabled(false); @@ -341,14 +337,7 @@ void CharCreateDialog::action(const ActionEvent &event) mAttributeSlider[i]->getValue())); } -#ifdef MANASERV_SUPPORT - int characterSlot = mSlot; - // On Manaserv, the slots start at 1, so we offset them. - if (Net::getNetworkType() == ServerInfo::MANASERV) - ++characterSlot; -#else const int characterSlot = mSlot; -#endif Net::getCharServerHandler()->newCharacter(getName(), characterSlot, mFemale->isSelected(), mHairStyle, mHairColor, diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp index d67c15bf0..3ef378aa0 100644 --- a/src/gui/windows/charselectdialog.cpp +++ b/src/gui/windows/charselectdialog.cpp @@ -474,14 +474,7 @@ void CharSelectDialog::setCharacters(const Net::Characters &characters) Net::Character *const character = *i; // Slots Number start at 1 for Manaserv, so we offset them by one. -#ifdef MANASERV_SUPPORT - int characterSlot = character->slot; - if (Net::getNetworkType() == ServerInfo::MANASERV && characterSlot > 0) - --characterSlot; -#else const int characterSlot = character->slot; -#endif - if (characterSlot >= static_cast(mCharacterEntries.size())) { logger->log("Warning: slot out of range: %d", character->slot); diff --git a/src/gui/windows/editserverdialog.cpp b/src/gui/windows/editserverdialog.cpp index e236841a5..c4e490091 100644 --- a/src/gui/windows/editserverdialog.cpp +++ b/src/gui/windows/editserverdialog.cpp @@ -139,21 +139,11 @@ EditServerDialog::EditServerDialog(ServerDialog *const parent, 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: + case ServerInfo::MANASERV: #ifndef EATHENA_SUPPORT case ServerInfo::EATHENA: #endif @@ -226,17 +216,6 @@ void EditServerDialog::action(const ActionEvent &event) 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/windows/selldialog.cpp b/src/gui/windows/selldialog.cpp index 524c77366..8bfcc6728 100644 --- a/src/gui/windows/selldialog.cpp +++ b/src/gui/windows/selldialog.cpp @@ -258,20 +258,10 @@ void SellDialog::action(const ActionEvent &event) mMaxItems -= mAmountItems; while (mAmountItems > 0) { -#ifdef MANASERV_SUPPORT - // This order is important, item->getCurrentInvIndex() would - // return the inventory index of the next Duplicate otherwise. - int itemIndex = item->getCurrentInvIndex(); - const int sellCount = item->sellCurrentDuplicate(mAmountItems); - // For Manaserv, the Item id is to be given as index. - if ((Net::getNetworkType() == ServerInfo::MANASERV)) - itemIndex = item->getId(); -#else // This order is important, item->getCurrentInvIndex() would // return the inventory index of the next Duplicate otherwise. const int itemIndex = item->getCurrentInvIndex(); const int sellCount = item->sellCurrentDuplicate(mAmountItems); -#endif Net::getNpcHandler()->sellItem(mNpcId, itemIndex, sellCount); mAmountItems -= sellCount; } diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp index 579e9ad18..faae75ab3 100644 --- a/src/gui/windows/serverdialog.cpp +++ b/src/gui/windows/serverdialog.cpp @@ -63,20 +63,12 @@ static std::string serverTypeToString(const ServerInfo::Type type) return "TmwAthena"; case ServerInfo::EVOL: return "Evol"; -#ifdef EATHENA_SUPPORT case ServerInfo::EATHENA: +#ifdef EATHENA_SUPPORT 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::MANASERV: case ServerInfo::UNKNOWN: return ""; } @@ -90,20 +82,12 @@ static uint16_t defaultPortForServerType(const ServerInfo::Type type) case ServerInfo::EATHENA: #ifdef EATHENA_SUPPORT return 6900; -#else - return 6901; #endif case ServerInfo::UNKNOWN: case ServerInfo::TMWATHENA: case ServerInfo::EVOL: -#ifdef MANASERV_SUPPORT - return 6901; - case ServerInfo::MANASERV: - return 9601; -#else case ServerInfo::MANASERV: return 6901; -#endif } } -- cgit v1.2.3-70-g09d2