summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-28 16:03:59 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-28 16:34:59 +0300
commitb96e6eeba6e1511568c8291bd8cb6a6d3706635c (patch)
treed021843c88d856f86f018547c30f1181290ffcbe /src/gui/windows
parent60859a71dd9794b0216cc7a60146d417e06dbbad (diff)
downloadmanaplus-b96e6eeba6e1511568c8291bd8cb6a6d3706635c.tar.gz
manaplus-b96e6eeba6e1511568c8291bd8cb6a6d3706635c.tar.bz2
manaplus-b96e6eeba6e1511568c8291bd8cb6a6d3706635c.tar.xz
manaplus-b96e6eeba6e1511568c8291bd8cb6a6d3706635c.zip
Remove define EATHENA_SUPPORT from all code.
Now eathena like support enabled always.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/bankwindow.h3
-rw-r--r--src/gui/windows/buydialog.cpp14
-rw-r--r--src/gui/windows/buyingstoreselldialog.h3
-rw-r--r--src/gui/windows/charselectdialog.cpp4
-rw-r--r--src/gui/windows/chatwindow.cpp2
-rw-r--r--src/gui/windows/chatwindow.h2
-rw-r--r--src/gui/windows/editserverdialog.cpp14
-rw-r--r--src/gui/windows/eggselectiondialog.h3
-rw-r--r--src/gui/windows/insertcarddialog.h3
-rw-r--r--src/gui/windows/inventorywindow.cpp38
-rw-r--r--src/gui/windows/inventorywindow.h4
-rw-r--r--src/gui/windows/itemamountwindow.cpp17
-rw-r--r--src/gui/windows/maileditwindow.h3
-rw-r--r--src/gui/windows/mailviewwindow.h3
-rw-r--r--src/gui/windows/mailwindow.h3
-rw-r--r--src/gui/windows/minimap.cpp4
-rw-r--r--src/gui/windows/npcdialog.cpp24
-rw-r--r--src/gui/windows/npcdialog.h2
-rw-r--r--src/gui/windows/serverdialog.cpp8
-rw-r--r--src/gui/windows/shopwindow.cpp18
-rw-r--r--src/gui/windows/shopwindow.h7
21 files changed, 0 insertions, 179 deletions
diff --git a/src/gui/windows/bankwindow.h b/src/gui/windows/bankwindow.h
index b3cea2be8..dca31aa45 100644
--- a/src/gui/windows/bankwindow.h
+++ b/src/gui/windows/bankwindow.h
@@ -21,8 +21,6 @@
#ifndef GUI_WINDOWS_BANKWINDOW_H
#define GUI_WINDOWS_BANKWINDOW_H
-#ifdef EATHENA_SUPPORT
-
#include "gui/widgets/window.h"
#include "listeners/actionlistener.h"
@@ -63,5 +61,4 @@ class BankWindow final : public Window,
extern BankWindow *bankWindow;
-#endif // EATHENA_SUPPORT
#endif // GUI_WINDOWS_BANKWINDOW_H
diff --git a/src/gui/windows/buydialog.cpp b/src/gui/windows/buydialog.cpp
index 9dd083d61..7c7d96a13 100644
--- a/src/gui/windows/buydialog.cpp
+++ b/src/gui/windows/buydialog.cpp
@@ -22,9 +22,7 @@
#include "gui/windows/buydialog.h"
-#ifdef EATHENA_SUPPORT
#include "actormanager.h"
-#endif
#include "configuration.h"
#include "units.h"
@@ -48,11 +46,9 @@
#include "net/adminhandler.h"
#include "net/buysellhandler.h"
-#ifdef EATHENA_SUPPORT
#include "net/cashshophandler.h"
#include "net/markethandler.h"
#include "net/vendinghandler.h"
-#endif
#include "net/serverfeatures.h"
#include "net/npchandler.h"
@@ -443,14 +439,12 @@ void BuyDialog::close()
case Nick:
case Items:
break;
-#ifdef EATHENA_SUPPORT
case Market:
marketHandler->close();
break;
case Cash:
cashShopHandler->close();
break;
-#endif
default:
buySellHandler->close();
break;
@@ -537,7 +531,6 @@ void BuyDialog::action(const ActionEvent &event)
if (mConfirmButton)
mConfirmButton->setEnabled(true);
}
-#ifdef EATHENA_SUPPORT
else if (mNpcId == fromInt(Market, BeingId))
{
marketHandler->buyItem(item->getId(),
@@ -554,7 +547,6 @@ void BuyDialog::action(const ActionEvent &event)
item->getColor(),
mAmountItems);
}
-#endif
else
{
npcHandler->buyItem(mNpcId,
@@ -567,7 +559,6 @@ void BuyDialog::action(const ActionEvent &event)
}
else if (mNpcId == fromInt(Nick, BeingId))
{
-#ifdef EATHENA_SUPPORT
if (serverFeatures->haveVending())
{
const Being *const being = actorManager->findBeingByName(
@@ -583,9 +574,6 @@ void BuyDialog::action(const ActionEvent &event)
}
}
else if (tradeWindow)
-#else
- if (tradeWindow)
-#endif
{
buySellHandler->sendBuyRequest(mNick,
item, mAmountItems);
@@ -598,13 +586,11 @@ void BuyDialog::action(const ActionEvent &event)
{
std::vector<ShopItem*> &items = mShopItems->allItems();
-#ifdef EATHENA_SUPPORT
if (mNpcId == fromInt(Market, BeingId))
{
marketHandler->buyItems(items);
}
else
-#endif
{
npcHandler->buyItems(items);
}
diff --git a/src/gui/windows/buyingstoreselldialog.h b/src/gui/windows/buyingstoreselldialog.h
index cb2219fca..db197bd22 100644
--- a/src/gui/windows/buyingstoreselldialog.h
+++ b/src/gui/windows/buyingstoreselldialog.h
@@ -23,8 +23,6 @@
#ifndef GUI_WINDOWS_BUYINGSTORESELLDIALOG_H
#define GUI_WINDOWS_BUYINGSTORESELLDIALOG_H
-#ifdef EATHENA_SUPPORT
-
#include "enums/simpletypes/beingid.h"
#include "gui/widgets/selldialog.h"
@@ -56,5 +54,4 @@ class BuyingStoreSellDialog final : public SellDialog
int mStoreId;
};
-#endif // EATHENA_SUPPORT
#endif // GUI_WINDOWS_BUYINGSTORESELLDIALOG_H
diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp
index 4f62ac9ba..56b0c5930 100644
--- a/src/gui/windows/charselectdialog.cpp
+++ b/src/gui/windows/charselectdialog.cpp
@@ -27,9 +27,7 @@
#include "units.h"
#include "listeners/charrenamelistener.h"
-#ifdef EATHENA_SUPPORT
#include "listeners/pincodelistener.h"
-#endif
#include "gui/windows/charcreatedialog.h"
#include "gui/windows/chardeleteconfirm.h"
@@ -165,7 +163,6 @@ void CharSelectDialog::postInit()
Window::postInit();
setVisible(Visible_true);
requestFocus();
-#ifdef EATHENA_SUPPORT
if (charServerHandler->isNeedCreatePin())
{
EditDialog *const dialog = CREATEWIDGETR(EditDialog,
@@ -175,7 +172,6 @@ void CharSelectDialog::postInit()
"OK");
dialog->addActionListener(&pincodeListener);
}
-#endif
}
void CharSelectDialog::action(const ActionEvent &event)
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index c9107b151..6685852fb 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -2205,7 +2205,6 @@ void ChatWindow::toggleChatFocus()
requestChatFocus();
}
-#ifdef EATHENA_SUPPORT
void ChatWindow::joinRoom(const bool isJoin)
{
Tab *const tab = mChatTabs->getTabByIndex(0);
@@ -2224,4 +2223,3 @@ void ChatWindow::joinRoom(const bool isJoin)
tab->setCaption(name);
}
}
-#endif
diff --git a/src/gui/windows/chatwindow.h b/src/gui/windows/chatwindow.h
index e8b0dc940..5032d337a 100644
--- a/src/gui/windows/chatwindow.h
+++ b/src/gui/windows/chatwindow.h
@@ -209,9 +209,7 @@ class ChatWindow final : public Window,
const bool switchTo,
const bool join) A_WARN_UNUSED;
-#ifdef EATHENA_SUPPORT
void joinRoom(const bool isJoin);
-#endif
void removeAllWhispers();
diff --git a/src/gui/windows/editserverdialog.cpp b/src/gui/windows/editserverdialog.cpp
index 154dca6b4..8f65bb8f5 100644
--- a/src/gui/windows/editserverdialog.cpp
+++ b/src/gui/windows/editserverdialog.cpp
@@ -149,15 +149,11 @@ EditServerDialog::EditServerDialog(ServerDialog *const parent,
switch (mServer.type)
{
case ServerType::EATHENA:
-#ifdef EATHENA_SUPPORT
#ifdef TMWA_SUPPORT
mTypeField->setSelected(1);
#else // TMWA_SUPPORT
mTypeField->setSelected(0);
#endif // TMWA_SUPPORT
-#else // EATHENA_SUPPORT
- mTypeField->setSelected(0);
-#endif // EATHENA_SUPPORT
break;
default:
case ServerType::UNKNOWN:
@@ -165,15 +161,11 @@ EditServerDialog::EditServerDialog(ServerDialog *const parent,
mTypeField->setSelected(0);
break;
case ServerType::EVOL2:
-#ifdef EATHENA_SUPPORT
#ifdef TMWA_SUPPORT
mTypeField->setSelected(2);
#else // TMWA_SUPPORT
mTypeField->setSelected(1);
#endif // TMWA_SUPPORT
-#else // EATHENA_SUPPORT
- mTypeField->setSelected(0);
-#endif // EATHENA_SUPPORT
break;
}
@@ -236,7 +228,6 @@ void EditServerDialog::action(const ActionEvent &event)
mPortField->getText().c_str()));
mServer.persistentIp = mPersistentIp->isSelected();
-#if defined(TMWA_SUPPORT) || defined(EATHENA_SUPPORT)
if (mTypeField)
{
switch (mTypeField->getSelected())
@@ -245,16 +236,13 @@ void EditServerDialog::action(const ActionEvent &event)
case 0:
mServer.type = ServerType::TMWATHENA;
break;
-#ifdef EATHENA_SUPPORT
case 1:
mServer.type = ServerType::EATHENA;
break;
case 2:
mServer.type = ServerType::EVOL2;
break;
-#endif
#else
-#ifdef EATHENA_SUPPORT
case 0:
mServer.type = ServerType::EATHENA;
break;
@@ -262,14 +250,12 @@ void EditServerDialog::action(const ActionEvent &event)
mServer.type = ServerType::EVOL2;
break;
#endif
-#endif
default:
mServer.type = ServerType::UNKNOWN;
break;
}
}
else
-#endif // defined(TMWA_SUPPORT) || defined(EATHENA_SUPPORT)
{
mServer.type = ServerType::TMWATHENA;
}
diff --git a/src/gui/windows/eggselectiondialog.h b/src/gui/windows/eggselectiondialog.h
index c8060dc10..2db06ba40 100644
--- a/src/gui/windows/eggselectiondialog.h
+++ b/src/gui/windows/eggselectiondialog.h
@@ -23,8 +23,6 @@
#ifndef GUI_WINDOWS_EGGSELECTIONDIALOG_H
#define GUI_WINDOWS_EGGSELECTIONDIALOG_H
-#ifdef EATHENA_SUPPORT
-
#include "gui/widgets/selldialog.h"
class EggSelectionDialog final : public SellDialog
@@ -44,5 +42,4 @@ class EggSelectionDialog final : public SellDialog
void sellAction(const ActionEvent &event) override final;
};
-#endif // EATHENA_SUPPORT
#endif // GUI_WINDOWS_EGGSELECTIONDIALOG_H
diff --git a/src/gui/windows/insertcarddialog.h b/src/gui/windows/insertcarddialog.h
index eff74cde0..a8d54e86f 100644
--- a/src/gui/windows/insertcarddialog.h
+++ b/src/gui/windows/insertcarddialog.h
@@ -23,8 +23,6 @@
#ifndef GUI_WINDOWS_INSERTCARDDIALOG_H
#define GUI_WINDOWS_INSERTCARDDIALOG_H
-#ifdef EATHENA_SUPPORT
-
#include "gui/widgets/selldialog.h"
class InsertCardDialog final : public SellDialog
@@ -48,5 +46,4 @@ class InsertCardDialog final : public SellDialog
int mItemIndex;
};
-#endif // EATHENA_SUPPORT
#endif // GUI_WINDOWS_INSERTCARDDIALOG_H
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index be38f70ac..d265a42b3 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -72,9 +72,7 @@
InventoryWindow *inventoryWindow = nullptr;
InventoryWindow *storageWindow = nullptr;
-#ifdef EATHENA_SUPPORT
InventoryWindow *cartWindow = nullptr;
-#endif
InventoryWindow::WindowList InventoryWindow::invInstances;
InsertCardListener insertCardListener;
@@ -124,11 +122,9 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
case InventoryType::Inventory:
case InventoryType::Trade:
case InventoryType::Npc:
-#ifdef EATHENA_SUPPORT
case InventoryType::Vending:
case InventoryType::Mail:
case InventoryType::Craft:
-#endif
case InventoryType::TypeEnd:
default:
mSortDropDown->setSelected(config.getIntValue(
@@ -138,12 +134,10 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
mSortDropDown->setSelected(config.getIntValue(
"storageSortOrder"));
break;
-#ifdef EATHENA_SUPPORT
case InventoryType::Cart:
mSortDropDown->setSelected(config.getIntValue(
"cartSortOrder"));
break;
-#endif
};
}
else
@@ -285,7 +279,6 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
break;
}
-#ifdef EATHENA_SUPPORT
case InventoryType::Cart:
{
// TRANSLATORS: storage button
@@ -315,16 +308,13 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
place(6, 6, mInvCloseButton);
break;
}
-#endif
default:
case InventoryType::Trade:
case InventoryType::Npc:
-#ifdef EATHENA_SUPPORT
case InventoryType::Vending:
case InventoryType::Mail:
case InventoryType::Craft:
-#endif
case InventoryType::TypeEnd:
break;
};
@@ -382,11 +372,9 @@ void InventoryWindow::storeSortOrder() const
case InventoryType::Inventory:
case InventoryType::Trade:
case InventoryType::Npc:
-#ifdef EATHENA_SUPPORT
case InventoryType::Vending:
case InventoryType::Mail:
case InventoryType::Craft:
-#endif
case InventoryType::TypeEnd:
default:
config.setValue("inventorySortOrder",
@@ -396,12 +384,10 @@ void InventoryWindow::storeSortOrder() const
config.setValue("storageSortOrder",
mSortDropDown->getSelected());
break;
-#ifdef EATHENA_SUPPORT
case InventoryType::Cart:
config.setValue("cartSortOrder",
mSortDropDown->getSelected());
break;
-#endif
};
}
}
@@ -444,13 +430,11 @@ void InventoryWindow::action(const ActionEvent &event)
ItemAmountWindow::showWindow(ItemAmountWindowUsage::StoreAdd,
this, item);
}
-#ifdef EATHENA_SUPPORT
else if (cartWindow && cartWindow->isWindowVisible())
{
ItemAmountWindow::showWindow(ItemAmountWindowUsage::CartAdd,
this, item);
}
-#endif
}
else if (eventId == "sort")
{
@@ -492,7 +476,6 @@ void InventoryWindow::action(const ActionEvent &event)
item->getQuantity(),
InventoryType::Storage);
}
-#ifdef EATHENA_SUPPORT
else if (cartWindow && cartWindow->isWindowVisible())
{
inventoryHandler->moveItem2(InventoryType::Inventory,
@@ -501,7 +484,6 @@ void InventoryWindow::action(const ActionEvent &event)
InventoryType::Cart);
}
else
-#endif
{
if (PlayerInfo::isItemProtected(item->getId()))
return;
@@ -530,13 +512,11 @@ void InventoryWindow::action(const ActionEvent &event)
ItemAmountWindow::showWindow(ItemAmountWindowUsage::StoreRemove,
this, item);
}
-#ifdef EATHENA_SUPPORT
else if (cartWindow && cartWindow->isWindowVisible())
{
ItemAmountWindow::showWindow(ItemAmountWindowUsage::CartRemove,
this, item);
}
-#endif
}
}
@@ -824,9 +804,7 @@ void InventoryWindow::close()
switch (mInventory->getType())
{
case InventoryType::Inventory:
-#ifdef EATHENA_SUPPORT
case InventoryType::Cart:
-#endif
setVisible(Visible_false);
break;
@@ -842,11 +820,9 @@ void InventoryWindow::close()
default:
case InventoryType::Trade:
case InventoryType::Npc:
-#ifdef EATHENA_SUPPORT
case InventoryType::Vending:
case InventoryType::Mail:
case InventoryType::Craft:
-#endif
case InventoryType::TypeEnd:
break;
}
@@ -857,12 +833,8 @@ void InventoryWindow::updateWeight()
if (!mInventory || !mWeightBar)
return;
const InventoryTypeT type = mInventory->getType();
-#ifdef EATHENA_SUPPORT
if (type != InventoryType::Inventory &&
type != InventoryType::Cart)
-#else
- if (type != InventoryType::Inventory)
-#endif
{
return;
}
@@ -907,11 +879,7 @@ void InventoryWindow::updateDropButton()
if (!mDropButton)
return;
-#ifdef EATHENA_SUPPORT
if (isStorageActive() || (cartWindow && cartWindow->isWindowVisible()))
-#else
- if (isStorageActive())
-#endif
{
// TRANSLATORS: inventory button
mDropButton->setCaption(_("Store"));
@@ -981,12 +949,8 @@ void InventoryWindow::widgetResized(const Event &event)
if (!mInventory)
return;
const InventoryTypeT type = mInventory->getType();
-#ifdef EATHENA_SUPPORT
if (type != InventoryType::Inventory &&
type != InventoryType::Cart)
-#else
- if (type != InventoryType::Inventory)
-#endif
{
return;
}
@@ -1041,7 +1005,6 @@ void InventoryWindow::attributeChanged(const AttributesT id,
}
}
-#ifdef EATHENA_SUPPORT
void InventoryWindow::combineItems(const int index1,
const int index2)
{
@@ -1104,4 +1067,3 @@ void InventoryWindow::moveItemToCraft(const int craftSlot)
}
}
}
-#endif
diff --git a/src/gui/windows/inventorywindow.h b/src/gui/windows/inventorywindow.h
index e19b219f8..90cf64ee0 100644
--- a/src/gui/windows/inventorywindow.h
+++ b/src/gui/windows/inventorywindow.h
@@ -46,9 +46,7 @@ class TextField;
extern InventoryWindow *inventoryWindow;
extern InventoryWindow *storageWindow;
-#ifdef EATHENA_SUPPORT
extern InventoryWindow *cartWindow;
-#endif // EATHENA_SUPPORT
/**
* Inventory dialog.
@@ -156,12 +154,10 @@ class InventoryWindow final : public Window,
const int oldVal,
const int newVal) override final;
-#ifdef EATHENA_SUPPORT
void combineItems(const int index1,
const int index2);
void moveItemToCraft(const int craftSlot);
-#endif
static bool isAnyInputFocused();
diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp
index b3fdf4a62..54e856539 100644
--- a/src/gui/windows/itemamountwindow.cpp
+++ b/src/gui/windows/itemamountwindow.cpp
@@ -33,9 +33,7 @@
#include "gui/popups/itempopup.h"
#include "gui/windows/maileditwindow.h"
-#ifdef EATHENA_SUPPORT
#include "gui/windows/npcdialog.h"
-#endif // EATHENA_SUPPORT
#include "gui/windows/shopwindow.h"
#include "gui/windows/tradewindow.h"
@@ -49,9 +47,7 @@
#include "gui/widgets/slider.h"
#include "net/inventoryhandler.h"
-#ifdef EATHENA_SUPPORT
#include "net/npchandler.h"
-#endif // EATHENA_SUPPORT
#include "resources/item/item.h"
@@ -98,7 +94,6 @@ void ItemAmountWindow::finish(Item *const item,
if (shopWindow)
shopWindow->addSellItem(item, amount, price);
break;
-#ifdef EATHENA_SUPPORT
case ItemAmountWindowUsage::CartAdd:
inventoryHandler->moveItem2(InventoryType::Inventory,
item->getInvIndex(), amount, InventoryType::Cart);
@@ -118,7 +113,6 @@ void ItemAmountWindow::finish(Item *const item,
dialog->addCraftItem(item, amount, price); // price as slot
break;
}
-#endif
default:
break;
}
@@ -264,7 +258,6 @@ ItemAmountWindow::ItemAmountWindow(const ItemAmountWindowUsageT usage,
// TRANSLATORS: amount window message
setCaption(_("Select amount of items to store."));
break;
-#ifdef EATHENA_SUPPORT
case ItemAmountWindowUsage::MailAdd:
// TRANSLATORS: amount window message
setCaption(_("Select amount of items to send."));
@@ -273,7 +266,6 @@ ItemAmountWindow::ItemAmountWindow(const ItemAmountWindowUsageT usage,
// TRANSLATORS: amount window message
setCaption(_("Select amount of items to craft."));
break;
-#endif
case ItemAmountWindowUsage::CartAdd:
// TRANSLATORS: amount window message
setCaption(_("Select amount of items to store to cart."));
@@ -365,7 +357,6 @@ void ItemAmountWindow::action(const ActionEvent &event)
}
else
{
-#ifdef EATHENA_SUPPORT
if (mUsage == ItemAmountWindowUsage::CraftAdd)
{
finish(mItem,
@@ -374,7 +365,6 @@ void ItemAmountWindow::action(const ActionEvent &event)
mUsage);
}
else
-#endif
{
finish(mItem,
mItemAmountTextField->getValue(),
@@ -488,23 +478,16 @@ void ItemAmountWindow::showWindow(const ItemAmountWindowUsageT usage,
usage != ItemAmountWindowUsage::ShopSellAdd &&
maxRange <= 1)
{
-#ifdef EATHENA_SUPPORT
if (usage == ItemAmountWindowUsage::CraftAdd)
finish(item, maxRange, tag, usage);
else
-#endif
finish(item, maxRange, 0, usage);
}
else
{
-#ifdef EATHENA_SUPPORT
ItemAmountWindow *const window = CREATEWIDGETR(ItemAmountWindow,
usage, parent, item, maxRange);
if (usage == ItemAmountWindowUsage::CraftAdd)
window->mPrice = tag;
-#else
- CREATEWIDGET(ItemAmountWindow,
- usage, parent, item, maxRange);
-#endif
}
}
diff --git a/src/gui/windows/maileditwindow.h b/src/gui/windows/maileditwindow.h
index 097820366..0ec83b0f7 100644
--- a/src/gui/windows/maileditwindow.h
+++ b/src/gui/windows/maileditwindow.h
@@ -21,8 +21,6 @@
#ifndef GUI_WINDOWS_MAILEDITWINDOW_H
#define GUI_WINDOWS_MAILEDITWINDOW_H
-#ifdef EATHENA_SUPPORT
-
#include "gui/widgets/window.h"
#include "listeners/actionlistener.h"
@@ -78,5 +76,4 @@ class MailEditWindow final : public Window,
extern MailEditWindow *mailEditWindow;
-#endif // EATHENA_SUPPORT
#endif // GUI_WINDOWS_MAILEDITWINDOW_H
diff --git a/src/gui/windows/mailviewwindow.h b/src/gui/windows/mailviewwindow.h
index 563f9e99f..4e2e95ddd 100644
--- a/src/gui/windows/mailviewwindow.h
+++ b/src/gui/windows/mailviewwindow.h
@@ -21,8 +21,6 @@
#ifndef GUI_WINDOWS_MAILVIEWWINDOW_H
#define GUI_WINDOWS_MAILVIEWWINDOW_H
-#ifdef EATHENA_SUPPORT
-
#include "gui/widgets/window.h"
#include "listeners/actionlistener.h"
@@ -63,5 +61,4 @@ class MailViewWindow final : public Window,
extern MailViewWindow *mailViewWindow;
-#endif // EATHENA_SUPPORT
#endif // GUI_WINDOWS_MAILVIEWWINDOW_H
diff --git a/src/gui/windows/mailwindow.h b/src/gui/windows/mailwindow.h
index 1a78c1de9..f8bf32d09 100644
--- a/src/gui/windows/mailwindow.h
+++ b/src/gui/windows/mailwindow.h
@@ -21,8 +21,6 @@
#ifndef GUI_WINDOWS_MAILWINDOW_H
#define GUI_WINDOWS_MAILWINDOW_H
-#ifdef EATHENA_SUPPORT
-
#include "gui/widgets/window.h"
#include "listeners/actionlistener.h"
@@ -84,5 +82,4 @@ class MailWindow final : public Window,
extern MailWindow *mailWindow;
-#endif // EATHENA_SUPPORT
#endif // GUI_WINDOWS_MAILWINDOW_H
diff --git a/src/gui/windows/minimap.cpp b/src/gui/windows/minimap.cpp
index 3450436ef..e149f06e8 100644
--- a/src/gui/windows/minimap.cpp
+++ b/src/gui/windows/minimap.cpp
@@ -352,12 +352,9 @@ void Minimap::draw2(Graphics *const graphics)
break;
case ActorType::LocalPet:
-#ifdef EATHENA_SUPPORT
case ActorType::Pet:
-#endif
type = UserColorId::PET;
break;
-#ifdef EATHENA_SUPPORT
case ActorType::Mercenary:
type = UserColorId::MERCENARY;
break;
@@ -369,7 +366,6 @@ void Minimap::draw2(Graphics *const graphics)
case ActorType::SkillUnit:
type = UserColorId::SKILLUNIT;
break;
-#endif
case ActorType::Avatar:
case ActorType::Unknown:
case ActorType::Player:
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp
index 8b850d463..16705a414 100644
--- a/src/gui/windows/npcdialog.cpp
+++ b/src/gui/windows/npcdialog.cpp
@@ -39,9 +39,7 @@
#include "gui/popups/popupmenu.h"
-#ifdef EATHENA_SUPPORT
#include "gui/windows/cutinwindow.h"
-#endif
#include "gui/windows/inventorywindow.h"
#include "gui/widgets/browserbox.h"
@@ -133,9 +131,7 @@ NpcDialog::NpcDialog(const BeingId npcId) :
// TRANSLATORS: npc dialog button
mResetButton(new Button(this, _("Reset"), "reset", this)),
mInventory(new Inventory(InventoryType::Npc, 1)),
-#ifdef EATHENA_SUPPORT
mComplexInventory(new ComplexInventory(InventoryType::Craft, 1)),
-#endif
mItemContainer(new ItemContainer(this, mInventory,
10000, ShowEmptyRows_true)),
mItemScrollArea(new ScrollArea(this, mItemContainer,
@@ -268,9 +264,7 @@ NpcDialog::~NpcDialog()
delete2(mItemLinkHandler);
delete2(mItemContainer);
delete2(mInventory);
-#ifdef EATHENA_SUPPORT
delete2(mComplexInventory);
-#endif
delete2(mItemScrollArea);
delete2(mListScrollArea);
delete2(mSkinScrollArea);
@@ -329,10 +323,8 @@ void NpcDialog::action(const ActionEvent &event)
else if (mActionState == NPC_ACTION_CLOSE
|| mActionState == NPC_ACTION_WAIT)
{
-#ifdef EATHENA_SUPPORT
if (cutInWindow)
cutInWindow->hide();
-#endif
closeDialog();
}
else if (mActionState == NPC_ACTION_INPUT)
@@ -478,7 +470,6 @@ void NpcDialog::action(const ActionEvent &event)
}
case NPC_INPUT_ITEM_CRAFT:
{
-#ifdef EATHENA_SUPPORT
restoreVirtuals();
if (!PacketLimiter::limitPackets(
PacketType::PACKET_NPC_INPUT))
@@ -509,7 +500,6 @@ void NpcDialog::action(const ActionEvent &event)
// need send selected item
npcHandler->stringInput(mNpcId, str);
mInventory->clear();
-#endif
break;
}
@@ -545,9 +535,7 @@ void NpcDialog::action(const ActionEvent &event)
mInventory->clear();
break;
case NPC_INPUT_ITEM_CRAFT:
-#ifdef EATHENA_SUPPORT
mComplexInventory->clear();
-#endif
break;
case NPC_INPUT_NONE:
case NPC_INPUT_LIST:
@@ -572,9 +560,7 @@ void NpcDialog::action(const ActionEvent &event)
mInventory->clear();
break;
case NPC_INPUT_ITEM_CRAFT:
-#ifdef EATHENA_SUPPORT
mComplexInventory->clear();
-#endif
break;
case NPC_INPUT_STRING:
case NPC_INPUT_INTEGER:
@@ -609,10 +595,8 @@ void NpcDialog::action(const ActionEvent &event)
npcHandler->listInput(mNpcId, 255);
break;
}
-#ifdef EATHENA_SUPPORT
if (cutInWindow)
cutInWindow->hide();
-#endif
closeDialog();
}
}
@@ -624,14 +608,12 @@ void NpcDialog::action(const ActionEvent &event)
Inventory *const inventory = PlayerInfo::getInventory();
if (inventory)
{
-#ifdef EATHENA_SUPPORT
if (mInputState == NPC_INPUT_ITEM_CRAFT)
{
if (mComplexInventory->addVirtualItem(item, -1, 1))
inventory->virtualRemove(item, 1);
}
else
-#endif
{
if (mInventory->addVirtualItem(item, -1, 1))
inventory->virtualRemove(item, 1);
@@ -814,12 +796,10 @@ void NpcDialog::itemIndexRequest(const int size)
void NpcDialog::itemCraftRequest(const int size A_TMWA_UNUSED)
{
-#ifdef EATHENA_SUPPORT
mActionState = NPC_ACTION_INPUT;
mInputState = NPC_INPUT_ITEM_CRAFT;
mComplexInventory->resize(size);
buildLayout();
-#endif
}
void NpcDialog::move(const int amount)
@@ -1014,11 +994,9 @@ void NpcDialog::placeItemInputControls()
mItemContainer->setMaxColumns(10000);
}
-#ifdef EATHENA_SUPPORT
if (mInputState == NPC_INPUT_ITEM_CRAFT)
mItemContainer->setInventory(mComplexInventory);
else
-#endif
mItemContainer->setInventory(mInventory);
if (mDialogInfo && mDialogInfo->hideText)
@@ -1402,7 +1380,6 @@ void NpcDialog::addCraftItem(Item *const item A_TMWA_UNUSED,
if (!inventory)
return;
-#ifdef EATHENA_SUPPORT
if (mComplexInventory->addVirtualItem(
item,
slot,
@@ -1410,5 +1387,4 @@ void NpcDialog::addCraftItem(Item *const item A_TMWA_UNUSED,
{
inventory->virtualRemove(item, amount);
}
-#endif
}
diff --git a/src/gui/windows/npcdialog.h b/src/gui/windows/npcdialog.h
index fa3e52097..1b34eebf4 100644
--- a/src/gui/windows/npcdialog.h
+++ b/src/gui/windows/npcdialog.h
@@ -318,9 +318,7 @@ class NpcDialog final : public Window,
Button *mResetButton A_NONNULLPOINTER;
Inventory *mInventory A_NONNULLPOINTER;
-#ifdef EATHENA_SUPPORT
ComplexInventory *mComplexInventory A_NONNULLPOINTER;
-#endif
ItemContainer *mItemContainer A_NONNULLPOINTER;
ScrollArea *mItemScrollArea A_NONNULLPOINTER;
diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp
index ea6511e37..6d9992cab 100644
--- a/src/gui/windows/serverdialog.cpp
+++ b/src/gui/windows/serverdialog.cpp
@@ -61,16 +61,10 @@ static std::string serverTypeToString(const ServerTypeT type)
#else
return "";
#endif
-#ifdef EATHENA_SUPPORT
case ServerType::EATHENA:
return "eAthena";
case ServerType::EVOL2:
return "Evol2";
-#else
- case ServerType::EATHENA:
- case ServerType::EVOL2:
- return "";
-#endif
default:
case ServerType::UNKNOWN:
return "";
@@ -84,9 +78,7 @@ static uint16_t defaultPortForServerType(const ServerTypeT type)
default:
case ServerType::EATHENA:
case ServerType::EVOL2:
-#ifdef EATHENA_SUPPORT
return 6900;
-#endif
case ServerType::UNKNOWN:
#ifdef TMWA_SUPPORT
case ServerType::TMWATHENA:
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index 6b7994854..cab3bcb37 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -32,9 +32,7 @@
#include "const/gui/chat.h"
#endif
-#ifdef EATHENA_SUPPORT
#include "gui/windows/editdialog.h"
-#endif
#include "gui/windows/itemamountwindow.h"
#include "gui/windows/setupwindow.h"
@@ -51,9 +49,7 @@
#include "gui/widgets/shoplistbox.h"
#include "gui/widgets/tabstrip.h"
-#ifdef EATHENA_SUPPORT
#include "listeners/shoprenamelistener.h"
-#endif
#ifdef TMWA_SUPPORT
#include "actormanager.h"
@@ -69,10 +65,8 @@
#include "being/playerrelations.h"
#include "net/chathandler.h"
#endif
-#ifdef EATHENA_SUPPORT
#include "net/buyingstorehandler.h"
#include "net/vendinghandler.h"
-#endif
#include "net/serverfeatures.h"
#ifdef TMWA_SUPPORT
#include "net/tradehandler.h"
@@ -102,12 +96,10 @@ ShopWindow::DialogList ShopWindow::instances;
ShopWindow::ShopWindow() :
// TRANSLATORS: shop window name
Window(_("Personal Shop"), Modal_false, nullptr, "shop.xml"),
-#ifdef EATHENA_SUPPORT
VendingModeListener(),
VendingSlotsListener(),
BuyingStoreModeListener(),
BuyingStoreSlotsListener(),
-#endif
ActionListener(),
SelectionListener(),
// TRANSLATORS: shop window button
@@ -217,9 +209,7 @@ ShopWindow::ShopWindow() :
center();
loadWindowState();
-#ifdef EATHENA_SUPPORT
updateShopName();
-#endif
instances.push_back(this);
}
@@ -308,7 +298,6 @@ void ShopWindow::action(const ActionEvent &event)
isBuySelected = false;
updateSelection();
}
-#ifdef EATHENA_SUPPORT
else if (eventId == "publish")
{
if (isBuySelected)
@@ -378,17 +367,12 @@ void ShopWindow::action(const ActionEvent &event)
shopRenameListener.setDialog(dialog);
dialog->addActionListener(&shopRenameListener);
}
-#endif
if (mSelectedItem < 1)
return;
-#ifdef EATHENA_SUPPORT
const Inventory *const inv = mHaveVending && !isBuySelected
? PlayerInfo::getCartInventory() : PlayerInfo::getInventory();
-#else
- const Inventory *const inv = PlayerInfo::getInventory();
-#endif
if (!inv)
return;
@@ -1122,7 +1106,6 @@ void ShopWindow::updateSelection()
updateButtonsAndLabels();
}
-#ifdef EATHENA_SUPPORT
void ShopWindow::updateShopName()
{
if (mSellShopName.empty())
@@ -1173,4 +1156,3 @@ void ShopWindow::buyingStoreEnabled(const bool b)
mBuyShopSize = 0;
updateButtonsAndLabels();
}
-#endif
diff --git a/src/gui/windows/shopwindow.h b/src/gui/windows/shopwindow.h
index 8bd5e5d2a..3123178e7 100644
--- a/src/gui/windows/shopwindow.h
+++ b/src/gui/windows/shopwindow.h
@@ -47,12 +47,10 @@ class TabStrip;
* \ingroup Interface
*/
class ShopWindow final : public Window,
-#ifdef EATHENA_SUPPORT
public VendingModeListener,
public VendingSlotsListener,
public BuyingStoreModeListener,
public BuyingStoreSlotsListener,
-#endif
public ActionListener,
public SelectionListener
{
@@ -148,7 +146,6 @@ class ShopWindow final : public Window,
bool isShopEmpty() const A_WARN_UNUSED;
-#ifdef EATHENA_SUPPORT
void vendingEnabled(const bool b) override final;
void vendingSlotsChanged(const int slots) override final;
@@ -158,18 +155,14 @@ class ShopWindow final : public Window,
void buyingStoreSlotsChanged(const int slots) override final;
void setShopName(const std::string &name);
-#endif
private:
#ifdef TMWA_SUPPORT
void startTrade();
#endif
-
void updateSelection();
-#ifdef EATHENA_SUPPORT
void updateShopName();
-#endif
typedef std::list<ShopWindow*> DialogList;
static DialogList instances;