From b3fb42d3225282bc146847488a74536953a2d726 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 28 Feb 2015 21:19:19 +0300 Subject: Build mailhandler only if eathena enabled. --- src/net/mailhandler.h | 3 +++ src/net/net.cpp | 4 ++-- src/net/tmwa/generalhandler.cpp | 4 ++-- src/net/tmwa/generalhandler.h | 2 +- src/net/tmwa/mailhandler.h | 3 +++ 5 files changed, 11 insertions(+), 5 deletions(-) (limited to 'src/net') diff --git a/src/net/mailhandler.h b/src/net/mailhandler.h index f21eb0f2c..f277392ec 100644 --- a/src/net/mailhandler.h +++ b/src/net/mailhandler.h @@ -21,6 +21,8 @@ #ifndef NET_MAILHANDLER_H #define NET_MAILHANDLER_H +#ifdef EATHENA_SUPPORT + #include #include "localconsts.h" @@ -57,4 +59,5 @@ class MailHandler notfinal extern Net::MailHandler *mailHandler; +#endif // EATHENA_SUPPORT #endif // NET_MAILHANDLER_H diff --git a/src/net/net.cpp b/src/net/net.cpp index 5a6156653..9c6d7df07 100644 --- a/src/net/net.cpp +++ b/src/net/net.cpp @@ -49,6 +49,7 @@ namespace Net class FamilyHandler; class FriendsHandler; class HomunculusHandler; + class MailHandler; #endif class AdminHandler; class BeingHandler; @@ -59,7 +60,6 @@ namespace Net class GeneralHandler; class GuildHandler; class InventoryHandler; - class MailHandler; class MarketHandler; class MercenaryHandler; class NpcHandler; @@ -91,7 +91,6 @@ Net::TradeHandler *tradeHandler = nullptr; Net::BeingHandler *beingHandler = nullptr; Net::BuySellHandler *buySellHandler = nullptr; Net::ServerFeatures *serverFeatures = nullptr; -Net::MailHandler *mailHandler = nullptr; Net::MercenaryHandler *mercenaryHandler = nullptr; #ifdef EATHENA_SUPPORT Net::AuctionHandler *auctionHandler = nullptr; @@ -102,6 +101,7 @@ Net::ElementalHandler *elementalHandler = nullptr; Net::FamilyHandler *familyHandler = nullptr; Net::FriendsHandler *friendsHandler = nullptr; Net::HomunculusHandler *homunculusHandler = nullptr; +Net::MailHandler *mailHandler = nullptr; #endif Net::QuestHandler *questHandler = nullptr; Net::MarketHandler *marketHandler = nullptr; diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp index 2a353df80..a1b1f45bc 100644 --- a/src/net/tmwa/generalhandler.cpp +++ b/src/net/tmwa/generalhandler.cpp @@ -105,7 +105,6 @@ GeneralHandler::GeneralHandler() : mTradeHandler(new TradeHandler), mQuestHandler(new QuestHandler), mServerFeatures(new ServerFeatures), - mMailHandler(new MailHandler), #ifdef EATHENA_SUPPORT mAuctionHandler(new AuctionHandler), mBankHandler(new BankHandler), @@ -115,6 +114,7 @@ GeneralHandler::GeneralHandler() : mFamilyHandler(new FamilyHandler), mFriendsHandler(new FriendsHandler), mHomunculusHandler(new HomunculusHandler), + mMailHandler(new MailHandler), #endif mMercenaryHandler(new MercenaryHandler), mMarketHandler(new MarketHandler), @@ -235,7 +235,6 @@ void GeneralHandler::load() mNetwork->registerHandler(mPartyHandler); mNetwork->registerHandler(mPetHandler); mNetwork->registerHandler(mQuestHandler); - mNetwork->registerHandler(mMailHandler); #ifdef EATHENA_SUPPORT mNetwork->registerHandler(mAuctionHandler); mNetwork->registerHandler(mBankHandler); @@ -245,6 +244,7 @@ void GeneralHandler::load() mNetwork->registerHandler(mFamilyHandler); mNetwork->registerHandler(mFriendsHandler); mNetwork->registerHandler(mHomunculusHandler); + mNetwork->registerHandler(mMailHandler); #endif mNetwork->registerHandler(mMercenaryHandler); mNetwork->registerHandler(mMarketHandler); diff --git a/src/net/tmwa/generalhandler.h b/src/net/tmwa/generalhandler.h index 746df8460..dcd717b70 100644 --- a/src/net/tmwa/generalhandler.h +++ b/src/net/tmwa/generalhandler.h @@ -81,7 +81,6 @@ class GeneralHandler final : public MessageHandler, MessageHandlerPtr mTradeHandler; MessageHandlerPtr mQuestHandler; ServerFeatures *mServerFeatures; - MessageHandlerPtr mMailHandler; #ifdef EATHENA_SUPPORT MessageHandlerPtr mAuctionHandler; MessageHandlerPtr mBankHandler; @@ -91,6 +90,7 @@ class GeneralHandler final : public MessageHandler, MessageHandlerPtr mFamilyHandler; MessageHandlerPtr mFriendsHandler; MessageHandlerPtr mHomunculusHandler; + MessageHandlerPtr mMailHandler; #endif MessageHandlerPtr mMercenaryHandler; MessageHandlerPtr mMarketHandler; diff --git a/src/net/tmwa/mailhandler.h b/src/net/tmwa/mailhandler.h index c891f484f..26e50eafb 100644 --- a/src/net/tmwa/mailhandler.h +++ b/src/net/tmwa/mailhandler.h @@ -21,6 +21,8 @@ #ifndef NET_TMWA_MAILHANDLER_H #define NET_TMWA_MAILHANDLER_H +#ifdef EATHENA_SUPPORT + #include "net/mailhandler.h" #include "net/tmwa/messagehandler.h" @@ -58,4 +60,5 @@ class MailHandler final : public MessageHandler, public Net::MailHandler } // namespace TmwAthena +#endif // EATHENA_SUPPORT #endif // NET_TMWA_MAILHANDLER_H -- cgit v1.2.3-70-g09d2