summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-27 02:03:03 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-27 02:03:03 +0300
commit8b1e42a9e0d311d9c393ebceef1d508cbc8ad324 (patch)
tree933f8817f6260f9a1faeaaf214340636df3f6687 /src
parentcc68aec5ca370dcf190af39f3f8b269706c928b2 (diff)
downloadplus-8b1e42a9e0d311d9c393ebceef1d508cbc8ad324.tar.gz
plus-8b1e42a9e0d311d9c393ebceef1d508cbc8ad324.tar.bz2
plus-8b1e42a9e0d311d9c393ebceef1d508cbc8ad324.tar.xz
plus-8b1e42a9e0d311d9c393ebceef1d508cbc8ad324.zip
Build friendshandler 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/friendshandler.h3
-rw-r--r--src/net/net.cpp4
-rw-r--r--src/net/tmwa/friendshandler.h3
-rw-r--r--src/net/tmwa/generalhandler.cpp4
-rw-r--r--src/net/tmwa/generalhandler.h2
7 files changed, 18 insertions, 11 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3b3f7acea..86504a9c1 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1327,8 +1327,6 @@ SET(SRCS_TMWA
net/tmwa/charserverhandler.h
net/tmwa/chathandler.cpp
net/tmwa/chathandler.h
- net/tmwa/friendshandler.cpp
- net/tmwa/friendshandler.h
net/tmwa/gamehandler.cpp
net/tmwa/gamehandler.h
net/tmwa/generalhandler.cpp
@@ -1395,6 +1393,8 @@ SET(SRCS_TMWAEATHENA
net/tmwa/elementalhandler.h
net/tmwa/familyhandler.cpp
net/tmwa/familyhandler.h
+ net/tmwa/friendshandler.cpp
+ net/tmwa/friendshandler.h
)
SET(SRCS_EATHENA
@@ -1424,6 +1424,7 @@ SET(SRCS_EATHENA
net/cashshophandler.h
net/elementalhandler.h
net/familyhandler.h
+ net/friendshandler.h
net/eathena/adminhandler.cpp
net/eathena/adminhandler.h
net/eathena/auctionhandler.cpp
diff --git a/src/Makefile.am b/src/Makefile.am
index 8273abf56..9ffcfc8f8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -651,7 +651,6 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
net/charserverhandler.cpp \
net/charserverhandler.h \
net/chathandler.h \
- net/friendshandler.h \
net/download.cpp \
net/download.h \
enums/net/auctionsearchtype.h \
@@ -1259,8 +1258,6 @@ manaplus_SOURCES += \
net/tmwa/charserverhandler.h \
net/tmwa/chathandler.cpp \
net/tmwa/chathandler.h \
- net/tmwa/friendshandler.cpp \
- net/tmwa/friendshandler.h \
net/tmwa/gamehandler.cpp \
net/tmwa/gamehandler.h \
net/tmwa/generalhandler.cpp \
@@ -1327,7 +1324,9 @@ manaplus_SOURCES += net/tmwa/auctionhandler.cpp \
net/tmwa/elementalhandler.cpp \
net/tmwa/elementalhandler.h \
net/tmwa/familyhandler.cpp \
- net/tmwa/familyhandler.h
+ net/tmwa/familyhandler.h \
+ net/tmwa/friendshandler.cpp \
+ net/tmwa/friendshandler.h
endif
manaplus_CXXFLAGS += -DEATHENA_SUPPORT
@@ -1357,6 +1356,7 @@ manaplus_SOURCES += gui/windows/bankwindow.cpp \
net/cashshophandler.h \
net/elementalhandler.h \
net/familyhandler.h \
+ net/friendshandler.h \
net/eathena/adminhandler.cpp \
net/eathena/adminhandler.h \
net/eathena/auctionhandler.cpp \
diff --git a/src/net/friendshandler.h b/src/net/friendshandler.h
index 068df8761..57dcec2e6 100644
--- a/src/net/friendshandler.h
+++ b/src/net/friendshandler.h
@@ -21,6 +21,8 @@
#ifndef NET_FRIENDSHANDLER_H
#define NET_FRIENDSHANDLER_H
+#ifdef EATHENA_SUPPORT
+
#include <string>
#include "localconsts.h"
@@ -47,4 +49,5 @@ class FriendsHandler notfinal
extern Net::FriendsHandler *friendsHandler;
+#endif // EATHENA_SUPPORT
#endif // NET_FRIENDSHANDLER_H
diff --git a/src/net/net.cpp b/src/net/net.cpp
index 3b86526cb..47ab9d8a0 100644
--- a/src/net/net.cpp
+++ b/src/net/net.cpp
@@ -47,13 +47,13 @@ namespace Net
class CashShopHandler;
class ElementalHandler;
class FamilyHandler;
+ class FriendsHandler;
#endif
class AdminHandler;
class BeingHandler;
class BuySellHandler;
class CharServerHandler;
class ChatHandler;
- class FriendsHandler;
class GameHandler;
class GeneralHandler;
class GuildHandler;
@@ -100,10 +100,10 @@ Net::BuyingStoreHandler *buyingStoreHandler = nullptr;
Net::CashShopHandler *cashShopHandler = nullptr;
Net::ElementalHandler *elementalHandler = nullptr;
Net::FamilyHandler *familyHandler = nullptr;
+Net::FriendsHandler *friendsHandler = nullptr;
#endif
Net::QuestHandler *questHandler = nullptr;
Net::HomunculusHandler *homunculusHandler = nullptr;
-Net::FriendsHandler *friendsHandler = nullptr;
Net::MarketHandler *marketHandler = nullptr;
Net::VendingHandler *vendingHandler = nullptr;
Net::SearchStoreHandler *searchStoreHandler = nullptr;
diff --git a/src/net/tmwa/friendshandler.h b/src/net/tmwa/friendshandler.h
index b5abdf8c4..2021352e4 100644
--- a/src/net/tmwa/friendshandler.h
+++ b/src/net/tmwa/friendshandler.h
@@ -21,6 +21,8 @@
#ifndef NET_TMWA_FRIENDSHANDLER_H
#define NET_TMWA_FRIENDSHANDLER_H
+#ifdef EATHENA_SUPPORT
+
#include "net/friendshandler.h"
#include "net/tmwa/messagehandler.h"
@@ -49,4 +51,5 @@ class FriendsHandler final : public MessageHandler,
} // namespace TmwAthena
+#endif // EATHENA_SUPPORT
#endif // NET_TMWA_FRIENDSHANDLER_H
diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp
index 7008a70f8..e525d5b85 100644
--- a/src/net/tmwa/generalhandler.cpp
+++ b/src/net/tmwa/generalhandler.cpp
@@ -113,10 +113,10 @@ GeneralHandler::GeneralHandler() :
mCashShopHandler(new CashShopHandler),
mElementalHandler(new ElementalHandler),
mFamilyHandler(new FamilyHandler),
+ mFriendsHandler(new FriendsHandler),
#endif
mMercenaryHandler(new MercenaryHandler),
mHomunculusHandler(new HomunculusHandler),
- mFriendsHandler(new FriendsHandler),
mMarketHandler(new MarketHandler),
mVendingHandler(new VendingHandler),
mSearchStoreHandler(new SearchStoreHandler)
@@ -243,10 +243,10 @@ void GeneralHandler::load()
mNetwork->registerHandler(mCashShopHandler);
mNetwork->registerHandler(mElementalHandler);
mNetwork->registerHandler(mFamilyHandler);
+ mNetwork->registerHandler(mFriendsHandler);
#endif
mNetwork->registerHandler(mMercenaryHandler);
mNetwork->registerHandler(mHomunculusHandler);
- mNetwork->registerHandler(mFriendsHandler);
mNetwork->registerHandler(mMarketHandler);
mNetwork->registerHandler(mVendingHandler);
mNetwork->registerHandler(mSearchStoreHandler);
diff --git a/src/net/tmwa/generalhandler.h b/src/net/tmwa/generalhandler.h
index 7f4d4793c..2075702ef 100644
--- a/src/net/tmwa/generalhandler.h
+++ b/src/net/tmwa/generalhandler.h
@@ -89,10 +89,10 @@ class GeneralHandler final : public MessageHandler,
MessageHandlerPtr mCashShopHandler;
MessageHandlerPtr mElementalHandler;
MessageHandlerPtr mFamilyHandler;
+ MessageHandlerPtr mFriendsHandler;
#endif
MessageHandlerPtr mMercenaryHandler;
MessageHandlerPtr mHomunculusHandler;
- MessageHandlerPtr mFriendsHandler;
MessageHandlerPtr mMarketHandler;
MessageHandlerPtr mVendingHandler;
MessageHandlerPtr mSearchStoreHandler;