summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-28 22:56:32 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-28 22:57:51 +0300
commit2490ef610773ad1c7adf33a28b2fc982b2b8ee7e (patch)
treee84fa69940813b4e00966ed6dbf595222120b889 /src/net
parent631e52266a80983046a61d68648becd9f3656ff7 (diff)
downloadplus-2490ef610773ad1c7adf33a28b2fc982b2b8ee7e.tar.gz
plus-2490ef610773ad1c7adf33a28b2fc982b2b8ee7e.tar.bz2
plus-2490ef610773ad1c7adf33a28b2fc982b2b8ee7e.tar.xz
plus-2490ef610773ad1c7adf33a28b2fc982b2b8ee7e.zip
Build vendinghandler only if eathena enabled.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/net.cpp4
-rw-r--r--src/net/tmwa/generalhandler.cpp8
-rw-r--r--src/net/tmwa/generalhandler.h2
-rw-r--r--src/net/tmwa/vendinghandler.h3
-rw-r--r--src/net/vendinghandler.h3
5 files changed, 14 insertions, 6 deletions
diff --git a/src/net/net.cpp b/src/net/net.cpp
index 326361b1c..fe06c4a63 100644
--- a/src/net/net.cpp
+++ b/src/net/net.cpp
@@ -53,6 +53,7 @@ namespace Net
class MarketHandler;
class MercenaryHandler;
class SearchStoreHandler;
+ class VendingHandler;
#endif
class AdminHandler;
class BeingHandler;
@@ -71,7 +72,6 @@ namespace Net
class ServerFeatures;
class SkillHandler;
class TradeHandler;
- class VendingHandler;
} // namespace Net
Net::AdminHandler *adminHandler = nullptr;
@@ -104,9 +104,9 @@ Net::MailHandler *mailHandler = nullptr;
Net::MarketHandler *marketHandler = nullptr;
Net::MercenaryHandler *mercenaryHandler = nullptr;
Net::SearchStoreHandler *searchStoreHandler = nullptr;
+Net::VendingHandler *vendingHandler = nullptr;
#endif
Net::QuestHandler *questHandler = nullptr;
-Net::VendingHandler *vendingHandler = nullptr;
namespace Net
{
diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp
index 3326ae3e7..921b30f7a 100644
--- a/src/net/tmwa/generalhandler.cpp
+++ b/src/net/tmwa/generalhandler.cpp
@@ -104,8 +104,8 @@ GeneralHandler::GeneralHandler() :
mSkillHandler(new SkillHandler),
mTradeHandler(new TradeHandler),
mQuestHandler(new QuestHandler),
- mServerFeatures(new ServerFeatures),
#ifdef EATHENA_SUPPORT
+ mServerFeatures(new ServerFeatures),
mAuctionHandler(new AuctionHandler),
mBankHandler(new BankHandler),
mBuyingStoreHandler(new BuyingStoreHandler),
@@ -118,8 +118,10 @@ GeneralHandler::GeneralHandler() :
mMarketHandler(new MarketHandler),
mMercenaryHandler(new MercenaryHandler),
mSearchStoreHandler(new SearchStoreHandler),
-#endif
mVendingHandler(new VendingHandler)
+#else
+ mServerFeatures(new ServerFeatures)
+#endif
{
static const uint16_t _messages[] =
{
@@ -248,8 +250,8 @@ void GeneralHandler::load()
mNetwork->registerHandler(mMarketHandler);
mNetwork->registerHandler(mMercenaryHandler);
mNetwork->registerHandler(mSearchStoreHandler);
-#endif
mNetwork->registerHandler(mVendingHandler);
+#endif
}
void GeneralHandler::reload()
diff --git a/src/net/tmwa/generalhandler.h b/src/net/tmwa/generalhandler.h
index 69208b4db..6c30a5d65 100644
--- a/src/net/tmwa/generalhandler.h
+++ b/src/net/tmwa/generalhandler.h
@@ -93,9 +93,9 @@ class GeneralHandler final : public MessageHandler,
MessageHandlerPtr mMailHandler;
MessageHandlerPtr mMarketHandler;
MessageHandlerPtr mSearchStoreHandler;
+ MessageHandlerPtr mVendingHandler;
#endif
MessageHandlerPtr mMercenaryHandler;
- MessageHandlerPtr mVendingHandler;
};
} // namespace TmwAthena
diff --git a/src/net/tmwa/vendinghandler.h b/src/net/tmwa/vendinghandler.h
index 22629be1f..ddfe72971 100644
--- a/src/net/tmwa/vendinghandler.h
+++ b/src/net/tmwa/vendinghandler.h
@@ -21,6 +21,8 @@
#ifndef NET_TMWA_VENDINGHANDLER_H
#define NET_TMWA_VENDINGHANDLER_H
+#ifdef EATHENA_SUPPORT
+
#include "net/vendinghandler.h"
#include "net/tmwa/messagehandler.h"
@@ -58,4 +60,5 @@ class VendingHandler final : public MessageHandler,
} // namespace TmwAthena
+#endif // EATHENA_SUPPORT
#endif // NET_TMWA_VENDINGHANDLER_H
diff --git a/src/net/vendinghandler.h b/src/net/vendinghandler.h
index 797ef8340..ea6c4f551 100644
--- a/src/net/vendinghandler.h
+++ b/src/net/vendinghandler.h
@@ -21,6 +21,8 @@
#ifndef NET_VENDINGHANDLER_H
#define NET_VENDINGHANDLER_H
+#ifdef EATHENA_SUPPORT
+
#include <string>
#include <vector>
@@ -60,4 +62,5 @@ class VendingHandler notfinal
extern Net::VendingHandler *vendingHandler;
+#endif // EATHENA_SUPPORT
#endif // NET_VENDINGHANDLER_H