diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-07-28 16:03:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-07-28 16:34:59 +0300 |
commit | b96e6eeba6e1511568c8291bd8cb6a6d3706635c (patch) | |
tree | d021843c88d856f86f018547c30f1181290ffcbe /src/gui | |
parent | 60859a71dd9794b0216cc7a60146d417e06dbbad (diff) | |
download | plus-b96e6eeba6e1511568c8291bd8cb6a6d3706635c.tar.gz plus-b96e6eeba6e1511568c8291bd8cb6a6d3706635c.tar.bz2 plus-b96e6eeba6e1511568c8291bd8cb6a6d3706635c.tar.xz plus-b96e6eeba6e1511568c8291bd8cb6a6d3706635c.zip |
Remove define EATHENA_SUPPORT from all code.
Now eathena like support enabled always.
Diffstat (limited to 'src/gui')
30 files changed, 3 insertions, 270 deletions
diff --git a/src/gui/models/typelistmodel.h b/src/gui/models/typelistmodel.h index 04d9d93de..6d96568c7 100644 --- a/src/gui/models/typelistmodel.h +++ b/src/gui/models/typelistmodel.h @@ -37,10 +37,8 @@ class TypeListModel final : public ListModel * Used to get number of line in the list */ int getNumberOfElements() override final A_WARN_UNUSED -#if defined(EATHENA_SUPPORT) && defined(TMWA_SUPPORT) +#if defined(TMWA_SUPPORT) { return 3; } -#elif defined(EATHENA_SUPPORT) - { return 2; } #else { return 2; } #endif @@ -54,21 +52,17 @@ class TypeListModel final : public ListModel #ifdef TMWA_SUPPORT if (elementIndex == 0) return "TmwAthena"; -#ifdef EATHENA_SUPPORT else if (elementIndex == 1) return "Hercules"; else if (elementIndex == 2) return "Evol2"; -#endif // EATHENA_SUPPORT else #else // TMWA_SUPPORT -#ifdef EATHENA_SUPPORT if (elementIndex == 0) return "Hercules"; else if (elementIndex == 1) return "Evol2"; else -#endif // EATHENA_SUPPORT #endif // TMWA_SUPPORT return "Unknown"; } diff --git a/src/gui/popups/beingpopup.cpp b/src/gui/popups/beingpopup.cpp index 3809ed4d2..75b72c732 100644 --- a/src/gui/popups/beingpopup.cpp +++ b/src/gui/popups/beingpopup.cpp @@ -126,7 +126,6 @@ void BeingPopup::show(const int x, const int y, Being *const b) (*it)->setCaption(std::string()); } -#ifdef EATHENA_SUPPORT const ActorTypeT type = b->getType(); if (type == ActorType::Pet) { @@ -167,7 +166,6 @@ void BeingPopup::show(const int x, const int y, Being *const b) } } else -#endif { if (!(b->getPartyName().empty())) { @@ -199,7 +197,6 @@ void BeingPopup::show(const int x, const int y, Being *const b) num ++; } -#ifdef EATHENA_SUPPORT if (!b->getBuyBoard().empty()) { ptr = mLabels[num]; @@ -209,9 +206,7 @@ void BeingPopup::show(const int x, const int y, Being *const b) ptr->adjustSize(); num ++; } -#endif -#ifdef EATHENA_SUPPORT if (!b->getSellBoard().empty()) { ptr = mLabels[num]; @@ -221,7 +216,6 @@ void BeingPopup::show(const int x, const int y, Being *const b) ptr->adjustSize(); num ++; } -#endif if (!b->getComment().empty()) { @@ -244,7 +238,6 @@ void BeingPopup::show(const int x, const int y, Being *const b) num ++; } -#ifdef EATHENA_SUPPORT const ChatObject *const chat = b->getChat(); if (chat) { @@ -255,7 +248,6 @@ void BeingPopup::show(const int x, const int y, Being *const b) ptr->adjustSize(); num ++; } -#endif } ptr = mLabels[num]; // TRANSLATORS: being popup label diff --git a/src/gui/popups/itempopup.cpp b/src/gui/popups/itempopup.cpp index f96a73493..158f8c57c 100644 --- a/src/gui/popups/itempopup.cpp +++ b/src/gui/popups/itempopup.cpp @@ -223,9 +223,7 @@ void ItemPopup::setItem(const ItemInfo &item, // TRANSLATORS: popup label mItemWeight->setTextWrapped(strprintf(_("Weight: %s"), Units::formatWeight(item.getWeight()).c_str()), 196); -#ifdef EATHENA_SUPPORT mItemCards->setTextWrapped(getCardsString(cards), 196); -#endif int minWidth = mItemName->getWidth() + space; @@ -267,7 +265,6 @@ void ItemPopup::setItem(const ItemInfo &item, mItemDesc->setPosition(0, 2 * height); } -#ifdef EATHENA_SUPPORT std::string ItemPopup::getCardsString(const int *const cards) { if (!cards) @@ -319,7 +316,6 @@ std::string ItemPopup::getCardsString(const int *const cards) } } } -#endif #define caseSetColor(name1, name2) \ case name1: \ diff --git a/src/gui/popups/itempopup.h b/src/gui/popups/itempopup.h index f862d2754..b9439fe1d 100644 --- a/src/gui/popups/itempopup.h +++ b/src/gui/popups/itempopup.h @@ -73,9 +73,7 @@ class ItemPopup final : public Popup void resetPopup(); private: -#ifdef EATHENA_SUPPORT std::string getCardsString(const int *const cards); -#endif Label *mItemName A_NONNULLPOINTER; TextBox *mItemDesc A_NONNULLPOINTER; diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index 4c417036b..e74873a10 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -67,11 +67,9 @@ #include "net/adminhandler.h" #include "net/chathandler.h" #include "net/guildhandler.h" -#ifdef EATHENA_SUPPORT #include "net/homunculushandler.h" #include "net/mercenaryhandler.h" #include "net/npchandler.h" -#endif #include "net/net.h" #include "net/pethandler.h" #include "net/serverfeatures.h" @@ -163,9 +161,7 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being) mY = y; const std::string &name = mName; -#ifdef EATHENA_SUPPORT if (being->getType() != ActorType::SkillUnit) -#endif { mBrowserBox->addRow(name + being->getGenderSignWithSpace()); } @@ -258,9 +254,7 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being) mBrowserBox->addRow("/navigateto 'NAME'", _("Move")); addPlayerMisc(); addBuySell(being); -#ifdef EATHENA_SUPPORT addChat(being); -#endif break; } @@ -293,9 +287,7 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being) // TRANSLATORS: popup menu item // TRANSLATORS: add comment to npc mBrowserBox->addRow("addcomment", _("Add comment")); -#ifdef EATHENA_SUPPORT addChat(being); -#endif break; case ActorType::Monster: @@ -339,7 +331,6 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being) break; } -#ifdef EATHENA_SUPPORT case ActorType::Mercenary: // TRANSLATORS: popup menu item // TRANSLATORS: Mercenary move to master @@ -435,7 +426,6 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being) creatorName.c_str())); break; } -#endif case ActorType::Avatar: case ActorType::Unknown: case ActorType::FloorItem: @@ -1122,7 +1112,6 @@ void PopupMenu::showEmoteType() // TRANSLATORS: show emotes for pet mBrowserBox->addRow("/setemotetype pet", _("Pet")); -#ifdef EATHENA_SUPPORT if (serverFeatures->haveServerPets()) { // TRANSLATORS: popup menu item @@ -1133,7 +1122,6 @@ void PopupMenu::showEmoteType() // TRANSLATORS: show emotes for mercenary mBrowserBox->addRow("/setemotetype merc", _("Mercenary")); } -#endif mBrowserBox->addRow("##3---"); // TRANSLATORS: popup menu item @@ -1479,7 +1467,6 @@ void PopupMenu::handleLink(const std::string &link, if (Widget::widgetExists(mWindow)) mWindow->setSticky(true); } -#ifdef EATHENA_SUPPORT else if (link == "join chat" && being) { const ChatObject *const chat = being->getChat(); @@ -1511,7 +1498,6 @@ void PopupMenu::handleLink(const std::string &link, showCraftPopup(); return; } -#endif else if (link == "pet feed") { petHandler->feed(); @@ -1799,7 +1785,6 @@ void PopupMenu::showPopup(Window *const parent, } mBrowserBox->addRow("##3---"); } -#ifdef EATHENA_SUPPORT if (npcHandler) { NpcDialog *const dialog = npcHandler->getCurrentNpcDialog(); @@ -1812,7 +1797,6 @@ void PopupMenu::showPopup(Window *const parent, _("Move to craft...")); } } -#endif addUseDrop(item, isProtected); break; @@ -1846,12 +1830,10 @@ void PopupMenu::showPopup(Window *const parent, case InventoryType::Trade: case InventoryType::Npc: -#ifdef EATHENA_SUPPORT case InventoryType::Cart: case InventoryType::Vending: case InventoryType::Mail: case InventoryType::Craft: -#endif case InventoryType::TypeEnd: default: break; @@ -2687,7 +2669,6 @@ void PopupMenu::addParty(const std::string &nick) } } -#ifdef EATHENA_SUPPORT void PopupMenu::addChat(const Being *const being) { if (!being) @@ -2702,7 +2683,6 @@ void PopupMenu::addChat(const Being *const being) mBrowserBox->addRow("##3---"); } } -#endif void PopupMenu::addPlayerMisc() { @@ -3197,7 +3177,6 @@ void PopupMenu::showGMPopup(const std::string &name) case ActorType::FloorItem: showFloorItemGMCommands(); break; -#ifdef EATHENA_SUPPORT case ActorType::Homunculus: showHomunGMCommands(); break; @@ -3209,7 +3188,6 @@ void PopupMenu::showGMPopup(const std::string &name) break; case ActorType::SkillUnit: break; -#endif default: case ActorType::Unknown: if (mItemId != 0) @@ -3230,7 +3208,6 @@ void PopupMenu::showGMPopup(const std::string &name) showPopup(getX(), getY()); } -#ifdef EATHENA_SUPPORT void PopupMenu::showHomunGMCommands() { } @@ -3262,40 +3239,33 @@ void PopupMenu::showCraftPopup() showPopup(mX, mY); } -#endif void PopupMenu::addMailCommands() { -#ifdef EATHENA_SUPPORT if (!serverFeatures->haveMail()) return; // TRANSLATORS: popup menu item // TRANSLATORS: open mail dialog mBrowserBox->addRow("/mailto 'NAME'", _("Mail to...")); -#endif } void PopupMenu::addCatchPetCommands() { -#ifdef EATHENA_SUPPORT if (!serverFeatures->haveServerPets()) return; // TRANSLATORS: popup menu item // TRANSLATORS: catch pet command mBrowserBox->addRow("/catchpet :'BEINGID'", _("Taming pet")); -#endif } void PopupMenu::showAdoptCommands() { -#ifdef EATHENA_SUPPORT if (!serverFeatures->haveFamily()) return; // TRANSLATORS: popup menu item // TRANSLATORS: adopt child command mBrowserBox->addRow("/adoptchild 'NAME'", _("Adopt child")); -#endif } void PopupMenu::moveUp() diff --git a/src/gui/popups/popupmenu.h b/src/gui/popups/popupmenu.h index cc1ad285f..a7a745873 100644 --- a/src/gui/popups/popupmenu.h +++ b/src/gui/popups/popupmenu.h @@ -165,9 +165,7 @@ class PopupMenu final : public Popup, public LinkHandler void showSkillLevelPopup(const SkillInfo *const info); -#ifdef EATHENA_SUPPORT void showCraftPopup(); -#endif void showEmoteType(); @@ -223,7 +221,6 @@ class PopupMenu final : public Popup, public LinkHandler void addWindowMenu(const Window *const window); -#ifdef EATHENA_SUPPORT void showHomunGMCommands(); void showPetGMCommands(); @@ -231,7 +228,6 @@ class PopupMenu final : public Popup, public LinkHandler void showMercenaryGMCommands(); void addChat(const Being *const being); -#endif void addMailCommands(); diff --git a/src/gui/shortcut/emoteshortcut.cpp b/src/gui/shortcut/emoteshortcut.cpp index 05a7b64c1..981a5c4e7 100644 --- a/src/gui/shortcut/emoteshortcut.cpp +++ b/src/gui/shortcut/emoteshortcut.cpp @@ -26,10 +26,8 @@ #include "being/localplayer.h" -#ifdef EATHENA_SUPPORT #include "net/homunculushandler.h" #include "net/mercenaryhandler.h" -#endif #include "net/pethandler.h" #include "resources/db/emotedb.h" @@ -110,14 +108,12 @@ void EmoteShortcut::useEmote(const int index) const case EmoteType::Pet: petHandler->emote(emote, 0); break; -#ifdef EATHENA_SUPPORT case EmoteType::Homunculus: homunculusHandler->emote(emote); break; case EmoteType::Mercenary: mercenaryHandler->emote(emote); break; -#endif } } } diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index 90a32165a..a543f53bd 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -446,12 +446,8 @@ bool Viewport::leftMouseAction() } else if (!stopAttack && (type == ActorType::Monster || - type == ActorType::Npc -#ifdef EATHENA_SUPPORT - || - type == ActorType::SkillUnit -#endif - )) + type == ActorType::Npc || + type == ActorType::SkillUnit)) { if ((localPlayer->withinAttackRange(mHoverBeing) || inputManager.isActionActive(InputAction::ATTACK))) @@ -837,11 +833,9 @@ void Viewport::mouseMoved(MouseEvent &event) if (mHoverBeing && (type == ActorType::Player || type == ActorType::Npc -#ifdef EATHENA_SUPPORT || type == ActorType::Homunculus || type == ActorType::Mercenary || type == ActorType::Pet -#endif || type == ActorType::LocalPet)) { popupManager->hideTextPopup(); @@ -899,12 +893,10 @@ void Viewport::mouseMoved(MouseEvent &event) case ActorType::Monster: case ActorType::Portal: case ActorType::LocalPet: -#ifdef EATHENA_SUPPORT case ActorType::Pet: case ActorType::Mercenary: case ActorType::Homunculus: case ActorType::SkillUnit: -#endif gui->setCursorType(mHoverBeing->getHoverCursor()); break; diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp index d49b16c18..0ff13d5ad 100644 --- a/src/gui/widgets/itemcontainer.cpp +++ b/src/gui/widgets/itemcontainer.cpp @@ -40,19 +40,13 @@ #include "gui/windows/inventorywindow.h" #include "gui/windows/shopwindow.h" #include "gui/windows/shortcutwindow.h" -#ifdef EATHENA_SUPPORT #include "gui/windows/itemamountwindow.h" #include "gui/windows/npcdialog.h" -#endif -#ifdef EATHENA_SUPPORT #include "input/inputmanager.h" -#endif #include "net/inventoryhandler.h" -#ifdef EATHENA_SUPPORT #include "net/npchandler.h" -#endif #include "net/tradehandler.h" #include "utils/delete2.h" @@ -602,7 +596,6 @@ void ItemContainer::mousePressed(MouseEvent &event) case InventoryType::Npc: src = DragDropSource::Npc; break; -#ifdef EATHENA_SUPPORT case InventoryType::Cart: src = DragDropSource::Cart; break; @@ -612,11 +605,8 @@ void ItemContainer::mousePressed(MouseEvent &event) case InventoryType::Craft: src = DragDropSource::Craft; break; -#endif default: -#ifdef EATHENA_SUPPORT case InventoryType::Vending: -#endif case InventoryType::TypeEnd: break; } @@ -712,7 +702,6 @@ void ItemContainer::mouseReleased(MouseEvent &event) case InventoryType::Npc: dst = DragDropSource::Npc; break; -#ifdef EATHENA_SUPPORT case InventoryType::Mail: dst = DragDropSource::Mail; break; @@ -722,11 +711,8 @@ void ItemContainer::mouseReleased(MouseEvent &event) case InventoryType::Craft: dst = DragDropSource::Craft; break; -#endif default: -#ifdef EATHENA_SUPPORT case InventoryType::Vending: -#endif case InventoryType::TypeEnd: break; } @@ -748,7 +734,6 @@ void ItemContainer::mouseReleased(MouseEvent &event) dstContainer = InventoryType::Inventory; inventory = PlayerInfo::getStorageInventory(); } -#ifdef EATHENA_SUPPORT if (src == DragDropSource::Inventory && dst == DragDropSource::Cart) { @@ -789,7 +774,6 @@ void ItemContainer::mouseReleased(MouseEvent &event) dstContainer = InventoryType::Cart; inventory = PlayerInfo::getStorageInventory(); } -#endif if (src == DragDropSource::Inventory && dst == DragDropSource::Trade) { @@ -797,12 +781,8 @@ void ItemContainer::mouseReleased(MouseEvent &event) inventory = PlayerInfo::getInventory(); } else if (src == DragDropSource::Inventory -#ifdef EATHENA_SUPPORT && (dst == DragDropSource::Npc || dst == DragDropSource::Mail)) -#else - && dst == DragDropSource::Npc) -#endif { inventory = PlayerInfo::getInventory(); if (inventory) @@ -865,7 +845,6 @@ void ItemContainer::mouseReleased(MouseEvent &event) return; } } -#ifdef EATHENA_SUPPORT else if (src == DragDropSource::Inventory && dst == DragDropSource::Craft) { @@ -946,7 +925,6 @@ void ItemContainer::mouseReleased(MouseEvent &event) } return; } -#endif if (inventory) { 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; |