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/tmwa/generalhandler.cpp | 4 ++-- src/net/tmwa/generalhandler.h | 2 +- src/net/tmwa/mailhandler.h | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src/net/tmwa') 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