summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-27 00:56:11 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-27 01:51:18 +0300
commit6901946dcbe81192560a80c20b1e787b11579ebc (patch)
tree43dffc0130d09b9d0b93e1f97dd856718fb2b799 /src/net
parente13a1fc1d45c009badc10b4ec4a72bbbcf6fe592 (diff)
downloadmanaverse-6901946dcbe81192560a80c20b1e787b11579ebc.tar.gz
manaverse-6901946dcbe81192560a80c20b1e787b11579ebc.tar.bz2
manaverse-6901946dcbe81192560a80c20b1e787b11579ebc.tar.xz
manaverse-6901946dcbe81192560a80c20b1e787b11579ebc.zip
Build elementalhandler only if eathena enabled.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/elementalhandler.h3
-rw-r--r--src/net/net.cpp4
-rw-r--r--src/net/tmwa/elementalhandler.h3
-rw-r--r--src/net/tmwa/generalhandler.cpp10
-rw-r--r--src/net/tmwa/generalhandler.h2
5 files changed, 15 insertions, 7 deletions
diff --git a/src/net/elementalhandler.h b/src/net/elementalhandler.h
index 5c7749eb4..aad35ef6e 100644
--- a/src/net/elementalhandler.h
+++ b/src/net/elementalhandler.h
@@ -21,6 +21,8 @@
#ifndef NET_ELEMENTALHANDLER_H
#define NET_ELEMENTALHANDLER_H
+#ifdef EATHENA_SUPPORT
+
#include <string>
#include "localconsts.h"
@@ -39,4 +41,5 @@ class ElementalHandler notfinal
extern Net::ElementalHandler *elementalHandler;
+#endif // EATHENA_SUPPORT
#endif // NET_ELEMENTALHANDLER_H
diff --git a/src/net/net.cpp b/src/net/net.cpp
index 473ac617b..e421bfe1a 100644
--- a/src/net/net.cpp
+++ b/src/net/net.cpp
@@ -45,13 +45,13 @@ namespace Net
class BankHandler;
class BuyingStoreHandler;
class CashShopHandler;
+ class ElementalHandler;
#endif
class AdminHandler;
class BeingHandler;
class BuySellHandler;
class CharServerHandler;
class ChatHandler;
- class ElementalHandler;
class FamilyHandler;
class FriendsHandler;
class GameHandler;
@@ -98,12 +98,12 @@ Net::AuctionHandler *auctionHandler = nullptr;
Net::BankHandler *bankHandler = nullptr;
Net::BuyingStoreHandler *buyingStoreHandler = nullptr;
Net::CashShopHandler *cashShopHandler = nullptr;
+Net::ElementalHandler *elementalHandler = nullptr;
#endif
Net::FamilyHandler *familyHandler = nullptr;
Net::QuestHandler *questHandler = nullptr;
Net::HomunculusHandler *homunculusHandler = nullptr;
Net::FriendsHandler *friendsHandler = nullptr;
-Net::ElementalHandler *elementalHandler = nullptr;
Net::MarketHandler *marketHandler = nullptr;
Net::VendingHandler *vendingHandler = nullptr;
Net::SearchStoreHandler *searchStoreHandler = nullptr;
diff --git a/src/net/tmwa/elementalhandler.h b/src/net/tmwa/elementalhandler.h
index 0f4e8b7d3..bacb7260e 100644
--- a/src/net/tmwa/elementalhandler.h
+++ b/src/net/tmwa/elementalhandler.h
@@ -21,6 +21,8 @@
#ifndef NET_TMWA_ELEMENTALHANDLER_H
#define NET_TMWA_ELEMENTALHANDLER_H
+#ifdef EATHENA_SUPPORT
+
#include "net/elementalhandler.h"
#include "net/tmwa/messagehandler.h"
@@ -40,4 +42,5 @@ class ElementalHandler final : public MessageHandler,
} // namespace TmwAthena
+#endif // EATHENA_SUPPORT
#endif // NET_TMWA_ELEMENTALHANDLER_H
diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp
index 1739aef45..bf36f1fc3 100644
--- a/src/net/tmwa/generalhandler.cpp
+++ b/src/net/tmwa/generalhandler.cpp
@@ -111,12 +111,12 @@ GeneralHandler::GeneralHandler() :
mBankHandler(new BankHandler),
mBuyingStoreHandler(new BuyingStoreHandler),
mCashShopHandler(new CashShopHandler),
+ mElementalHandler(new ElementalHandler),
#endif
mFamilyHandler(new FamilyHandler),
mMercenaryHandler(new MercenaryHandler),
mHomunculusHandler(new HomunculusHandler),
mFriendsHandler(new FriendsHandler),
- mElementalHandler(new ElementalHandler),
mMarketHandler(new MarketHandler),
mVendingHandler(new VendingHandler),
mSearchStoreHandler(new SearchStoreHandler)
@@ -236,15 +236,17 @@ void GeneralHandler::load()
mNetwork->registerHandler(mPetHandler);
mNetwork->registerHandler(mQuestHandler);
mNetwork->registerHandler(mMailHandler);
+#ifdef EATHENA_SUPPORT
mNetwork->registerHandler(mAuctionHandler);
+ mNetwork->registerHandler(mBankHandler);
+ mNetwork->registerHandler(mBuyingStoreHandler);
mNetwork->registerHandler(mCashShopHandler);
+ mNetwork->registerHandler(mElementalHandler);
+#endif
mNetwork->registerHandler(mFamilyHandler);
- mNetwork->registerHandler(mBankHandler);
mNetwork->registerHandler(mMercenaryHandler);
- mNetwork->registerHandler(mBuyingStoreHandler);
mNetwork->registerHandler(mHomunculusHandler);
mNetwork->registerHandler(mFriendsHandler);
- mNetwork->registerHandler(mElementalHandler);
mNetwork->registerHandler(mMarketHandler);
mNetwork->registerHandler(mVendingHandler);
mNetwork->registerHandler(mSearchStoreHandler);
diff --git a/src/net/tmwa/generalhandler.h b/src/net/tmwa/generalhandler.h
index 292ce6dd7..08ef109a9 100644
--- a/src/net/tmwa/generalhandler.h
+++ b/src/net/tmwa/generalhandler.h
@@ -87,12 +87,12 @@ class GeneralHandler final : public MessageHandler,
MessageHandlerPtr mBankHandler;
MessageHandlerPtr mBuyingStoreHandler;
MessageHandlerPtr mCashShopHandler;
+ MessageHandlerPtr mElementalHandler;
#endif
MessageHandlerPtr mFamilyHandler;
MessageHandlerPtr mMercenaryHandler;
MessageHandlerPtr mHomunculusHandler;
MessageHandlerPtr mFriendsHandler;
- MessageHandlerPtr mElementalHandler;
MessageHandlerPtr mMarketHandler;
MessageHandlerPtr mVendingHandler;
MessageHandlerPtr mSearchStoreHandler;