summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-28 22:22:27 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-28 22:57:47 +0300
commit631e52266a80983046a61d68648becd9f3656ff7 (patch)
tree7dd0519126de551fba03966dae97ab25b3d8a690 /src
parent22bb94a2587fa16d808ec966f01d07dc27d9f5d9 (diff)
downloadmanaverse-631e52266a80983046a61d68648becd9f3656ff7.tar.gz
manaverse-631e52266a80983046a61d68648becd9f3656ff7.tar.bz2
manaverse-631e52266a80983046a61d68648becd9f3656ff7.tar.xz
manaverse-631e52266a80983046a61d68648becd9f3656ff7.zip
Build searchstorehandler only if eathena enabled.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt5
-rw-r--r--src/Makefile.am8
-rw-r--r--src/net/net.cpp4
-rw-r--r--src/net/searchstorehandler.h3
-rw-r--r--src/net/tmwa/generalhandler.cpp6
-rw-r--r--src/net/tmwa/generalhandler.h2
-rw-r--r--src/net/tmwa/searchstorehandler.h3
7 files changed, 19 insertions, 12 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f30364533..c836fb1ff 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1355,8 +1355,6 @@ SET(SRCS_TMWA
net/tmwa/protocol.h
net/tmwa/questhandler.cpp
net/tmwa/questhandler.h
- net/tmwa/searchstorehandler.cpp
- net/tmwa/searchstorehandler.h
net/tmwa/serverfeatures.cpp
net/tmwa/serverfeatures.h
net/tmwa/skillhandler.cpp
@@ -1391,6 +1389,8 @@ SET(SRCS_TMWAEATHENA
net/tmwa/markethandler.h
net/tmwa/mercenaryhandler.cpp
net/tmwa/mercenaryhandler.h
+ net/tmwa/searchstorehandler.cpp
+ net/tmwa/searchstorehandler.h
)
SET(SRCS_EATHENA
@@ -1425,6 +1425,7 @@ SET(SRCS_EATHENA
net/mailhandler.h
net/markethandler.h
net/mercenaryhandler.h
+ net/searchstorehandler.h
net/eathena/adminhandler.cpp
net/eathena/adminhandler.h
net/eathena/auctionhandler.cpp
diff --git a/src/Makefile.am b/src/Makefile.am
index d4815ed82..16b1edf98 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -684,7 +684,6 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
net/registrationoptions.h \
net/sdltcpnet.cpp \
net/sdltcpnet.h \
- net/searchstorehandler.h \
net/serverfeatures.h \
net/serverinfo.h \
net/skillhandler.h \
@@ -1286,8 +1285,6 @@ manaplus_SOURCES += \
net/tmwa/protocol.h \
net/tmwa/questhandler.cpp \
net/tmwa/questhandler.h \
- net/tmwa/searchstorehandler.cpp \
- net/tmwa/searchstorehandler.h \
net/tmwa/serverfeatures.cpp \
net/tmwa/serverfeatures.h \
net/tmwa/skillhandler.cpp \
@@ -1322,7 +1319,9 @@ manaplus_SOURCES += net/tmwa/auctionhandler.cpp \
net/tmwa/markethandler.cpp \
net/tmwa/markethandler.h \
net/tmwa/mercenaryhandler.cpp \
- net/tmwa/mercenaryhandler.h
+ net/tmwa/mercenaryhandler.h \
+ net/tmwa/searchstorehandler.cpp \
+ net/tmwa/searchstorehandler.h
endif
manaplus_CXXFLAGS += -DEATHENA_SUPPORT
@@ -1357,6 +1356,7 @@ manaplus_SOURCES += gui/windows/bankwindow.cpp \
net/mailhandler.h \
net/markethandler.h \
net/mercenaryhandler.h \
+ net/searchstorehandler.h \
net/eathena/adminhandler.cpp \
net/eathena/adminhandler.h \
net/eathena/auctionhandler.cpp \
diff --git a/src/net/net.cpp b/src/net/net.cpp
index 7b0d34d9a..326361b1c 100644
--- a/src/net/net.cpp
+++ b/src/net/net.cpp
@@ -52,6 +52,7 @@ namespace Net
class MailHandler;
class MarketHandler;
class MercenaryHandler;
+ class SearchStoreHandler;
#endif
class AdminHandler;
class BeingHandler;
@@ -67,7 +68,6 @@ namespace Net
class PetHandler;
class PlayerHandler;
class QuestHandler;
- class SearchStoreHandler;
class ServerFeatures;
class SkillHandler;
class TradeHandler;
@@ -103,10 +103,10 @@ Net::HomunculusHandler *homunculusHandler = nullptr;
Net::MailHandler *mailHandler = nullptr;
Net::MarketHandler *marketHandler = nullptr;
Net::MercenaryHandler *mercenaryHandler = nullptr;
+Net::SearchStoreHandler *searchStoreHandler = nullptr;
#endif
Net::QuestHandler *questHandler = nullptr;
Net::VendingHandler *vendingHandler = nullptr;
-Net::SearchStoreHandler *searchStoreHandler = nullptr;
namespace Net
{
diff --git a/src/net/searchstorehandler.h b/src/net/searchstorehandler.h
index 3f65730fd..19ef98af6 100644
--- a/src/net/searchstorehandler.h
+++ b/src/net/searchstorehandler.h
@@ -21,6 +21,8 @@
#ifndef NET_SEARCHSTOREHANDLER_H
#define NET_SEARCHSTOREHANDLER_H
+#ifdef EATHENA_SUPPORT
+
#include <string>
#include "enums/net/storesearchtype.h"
@@ -54,4 +56,5 @@ class SearchStoreHandler notfinal
extern Net::SearchStoreHandler *searchStoreHandler;
+#endif // EATHENA_SUPPORT
#endif // NET_SEARCHSTOREHANDLER_H
diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp
index 9205db800..3326ae3e7 100644
--- a/src/net/tmwa/generalhandler.cpp
+++ b/src/net/tmwa/generalhandler.cpp
@@ -117,9 +117,9 @@ GeneralHandler::GeneralHandler() :
mMailHandler(new MailHandler),
mMarketHandler(new MarketHandler),
mMercenaryHandler(new MercenaryHandler),
+ mSearchStoreHandler(new SearchStoreHandler),
#endif
- mVendingHandler(new VendingHandler),
- mSearchStoreHandler(new SearchStoreHandler)
+ mVendingHandler(new VendingHandler)
{
static const uint16_t _messages[] =
{
@@ -247,9 +247,9 @@ void GeneralHandler::load()
mNetwork->registerHandler(mMailHandler);
mNetwork->registerHandler(mMarketHandler);
mNetwork->registerHandler(mMercenaryHandler);
+ mNetwork->registerHandler(mSearchStoreHandler);
#endif
mNetwork->registerHandler(mVendingHandler);
- mNetwork->registerHandler(mSearchStoreHandler);
}
void GeneralHandler::reload()
diff --git a/src/net/tmwa/generalhandler.h b/src/net/tmwa/generalhandler.h
index c037da7c2..69208b4db 100644
--- a/src/net/tmwa/generalhandler.h
+++ b/src/net/tmwa/generalhandler.h
@@ -92,10 +92,10 @@ class GeneralHandler final : public MessageHandler,
MessageHandlerPtr mHomunculusHandler;
MessageHandlerPtr mMailHandler;
MessageHandlerPtr mMarketHandler;
+ MessageHandlerPtr mSearchStoreHandler;
#endif
MessageHandlerPtr mMercenaryHandler;
MessageHandlerPtr mVendingHandler;
- MessageHandlerPtr mSearchStoreHandler;
};
} // namespace TmwAthena
diff --git a/src/net/tmwa/searchstorehandler.h b/src/net/tmwa/searchstorehandler.h
index 4f2f9a6de..b0217d3cb 100644
--- a/src/net/tmwa/searchstorehandler.h
+++ b/src/net/tmwa/searchstorehandler.h
@@ -21,6 +21,8 @@
#ifndef NET_TMWA_SEARCHSTOREHANDLER_H
#define NET_TMWA_SEARCHSTOREHANDLER_H
+#ifdef EATHENA_SUPPORT
+
#include "net/searchstorehandler.h"
#include "net/tmwa/messagehandler.h"
@@ -53,4 +55,5 @@ class SearchStoreHandler final : public MessageHandler,
} // namespace TmwAthena
+#endif // EATHENA_SUPPORT
#endif // NET_TMWA_SEARCHSTOREHANDLER_H