diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-02-16 17:56:25 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-02-16 17:56:25 +0300 |
commit | 91639f6f2834d93e1c285bfc4060262537cc9358 (patch) | |
tree | 3ebf3a3d418e6cb3f5b3fe6540009a065e484f6a /src | |
parent | 88b62a5e35961c738c70ae193ee49943caf7f625 (diff) | |
download | manaverse-91639f6f2834d93e1c285bfc4060262537cc9358.tar.gz manaverse-91639f6f2834d93e1c285bfc4060262537cc9358.tar.bz2 manaverse-91639f6f2834d93e1c285bfc4060262537cc9358.tar.xz manaverse-91639f6f2834d93e1c285bfc4060262537cc9358.zip |
Build BankWindow only if eathena support enabled.
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/Makefile.am | 6 | ||||
-rw-r--r-- | src/actions/windows.cpp | 4 | ||||
-rw-r--r-- | src/game.cpp | 4 | ||||
-rw-r--r-- | src/gui/windows/bankwindow.h | 3 |
5 files changed, 16 insertions, 5 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8c22f1eb8..460587246 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -399,8 +399,6 @@ SET(SRCS gui/windows/okdialog.h gui/windows/outfitwindow.cpp gui/windows/outfitwindow.h - gui/windows/bankwindow.cpp - gui/windows/bankwindow.h gui/windows/botcheckerwindow.cpp gui/windows/botcheckerwindow.h gui/windows/textcommandeditor.cpp @@ -1414,6 +1412,8 @@ SET(SRCS_TMWA ) SET(SRCS_EATHENA + gui/windows/bankwindow.cpp + gui/windows/bankwindow.h net/eathena/adminhandler.cpp net/eathena/adminhandler.h net/eathena/auctionhandler.cpp diff --git a/src/Makefile.am b/src/Makefile.am index cc0d41bd6..1b15adb18 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -529,8 +529,6 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \ gui/windows/okdialog.h \ gui/windows/outfitwindow.cpp \ gui/windows/outfitwindow.h \ - gui/windows/bankwindow.cpp \ - gui/windows/bankwindow.h \ gui/windows/botcheckerwindow.cpp \ gui/windows/botcheckerwindow.h \ gui/windows/textcommandeditor.cpp \ @@ -1350,7 +1348,9 @@ endif if ENABLE_EATHENA manaplus_CXXFLAGS += -DEATHENA_SUPPORT -manaplus_SOURCES += net/eathena/adminhandler.cpp \ +manaplus_SOURCES += gui/windows/bankwindow.cpp \ + gui/windows/bankwindow.h \ + net/eathena/adminhandler.cpp \ net/eathena/adminhandler.h \ net/eathena/auctionhandler.cpp \ net/eathena/auctionhandler.h \ diff --git a/src/actions/windows.cpp b/src/actions/windows.cpp index 74f5aa071..1b879496a 100644 --- a/src/actions/windows.cpp +++ b/src/actions/windows.cpp @@ -270,11 +270,15 @@ impHandler0(questsWindowShow) impHandler0(bankWindowShow) { +#ifdef EATHENA_SUPPORT if (!serverFeatures->haveBankApi()) return false; showHideWindow(bankWindow); return true; +#else + return false; +#endif } impHandler0(cartWindowShow) diff --git a/src/game.cpp b/src/game.cpp index 1b67f6d90..82cc54d15 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -232,7 +232,9 @@ static void createGuiWindows() new SpellShortcutContainer(nullptr, f)); } +#ifdef EATHENA_SUPPORT bankWindow = new BankWindow; +#endif botCheckerWindow = new BotCheckerWindow; whoIsOnline = new WhoIsOnline; whoIsOnline->postInit(); @@ -341,7 +343,9 @@ static void destroyGuiWindows() delete2(socialWindow) delete2(dropShortcutWindow); delete2(spellShortcutWindow); +#ifdef EATHENA_SUPPORT delete2(bankWindow); +#endif delete2(botCheckerWindow); delete2(questsWindow); delete2(whoIsOnline); diff --git a/src/gui/windows/bankwindow.h b/src/gui/windows/bankwindow.h index 0995d2c22..92985e75c 100644 --- a/src/gui/windows/bankwindow.h +++ b/src/gui/windows/bankwindow.h @@ -21,6 +21,8 @@ #ifndef GUI_WINDOWS_BANKWINDOW_H #define GUI_WINDOWS_BANKWINDOW_H +#ifdef EATHENA_SUPPORT + #include "gui/widgets/window.h" #include "listeners/actionlistener.h" @@ -61,4 +63,5 @@ class BankWindow final : public Window, extern BankWindow *bankWindow; +#endif // EATHENA_SUPPORT #endif // GUI_WINDOWS_BANKWINDOW_H |