summaryrefslogtreecommitdiff
path: root/src/net/tmwa
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/tmwa')
-rw-r--r--src/net/tmwa/barterhandler.cpp43
-rw-r--r--src/net/tmwa/barterhandler.h42
-rw-r--r--src/net/tmwa/generalhandler.cpp3
-rw-r--r--src/net/tmwa/generalhandler.h2
4 files changed, 90 insertions, 0 deletions
diff --git a/src/net/tmwa/barterhandler.cpp b/src/net/tmwa/barterhandler.cpp
new file mode 100644
index 000000000..04fb20de3
--- /dev/null
+++ b/src/net/tmwa/barterhandler.cpp
@@ -0,0 +1,43 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2011-2019 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "net/tmwa/barterhandler.h"
+
+#include "debug.h"
+
+namespace TmwAthena
+{
+
+BarterHandler::BarterHandler() :
+ Net::BarterHandler()
+{
+ barterHandler = this;
+}
+
+BarterHandler::~BarterHandler()
+{
+ barterHandler = nullptr;
+}
+
+void BarterHandler::close() const
+{
+}
+
+} // namespace TmwAthena
diff --git a/src/net/tmwa/barterhandler.h b/src/net/tmwa/barterhandler.h
new file mode 100644
index 000000000..359e4ec72
--- /dev/null
+++ b/src/net/tmwa/barterhandler.h
@@ -0,0 +1,42 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2011-2019 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NET_TMWA_BARTERHANDLER_H
+#define NET_TMWA_BARTERHANDLER_H
+
+#include "net/barterhandler.h"
+
+namespace TmwAthena
+{
+class BarterHandler final : public Net::BarterHandler
+{
+ public:
+ BarterHandler();
+
+ A_DELETE_COPY(BarterHandler)
+
+ ~BarterHandler() override final;
+
+ void close() const override final;
+};
+
+} // namespace TmwAthena
+
+#endif // NET_TMWA_BARTERHANDLER_H
diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp
index b85c7658c..994be2ce7 100644
--- a/src/net/tmwa/generalhandler.cpp
+++ b/src/net/tmwa/generalhandler.cpp
@@ -55,6 +55,7 @@
#include "net/tmwa/achievementhandler.h"
#include "net/tmwa/attendancehandler.h"
#include "net/tmwa/bankhandler.h"
+#include "net/tmwa/barterhandler.h"
#include "net/tmwa/battlegroundhandler.h"
#include "net/tmwa/buyingstorehandler.h"
#include "net/tmwa/cashshophandler.h"
@@ -114,6 +115,7 @@ GeneralHandler::GeneralHandler() :
mMailHandler(new MailHandler),
mMapHandler(new MapHandler),
mMarketHandler(new MarketHandler),
+ mBarterHandler(new BarterHandler),
mMercenaryHandler(new MercenaryHandler),
mRouletteHandler(new RouletteHandler),
mSearchStoreHandler(new SearchStoreHandler),
@@ -161,6 +163,7 @@ GeneralHandler::~GeneralHandler()
delete2(mMailHandler)
delete2(mMapHandler)
delete2(mMarketHandler)
+ delete2(mBarterHandler)
delete2(mMercenaryHandler)
delete2(mRouletteHandler)
delete2(mSearchStoreHandler)
diff --git a/src/net/tmwa/generalhandler.h b/src/net/tmwa/generalhandler.h
index d3961fcab..b2ded08a5 100644
--- a/src/net/tmwa/generalhandler.h
+++ b/src/net/tmwa/generalhandler.h
@@ -28,6 +28,7 @@
namespace TmwAthena
{
class AdminHandler;
+class BarterHandler;
class BeingHandler;
class BuySellHandler;
class CharServerHandler;
@@ -128,6 +129,7 @@ class GeneralHandler final : public Net::GeneralHandler
MailHandler *mMailHandler;
MapHandler *mMapHandler;
MarketHandler *mMarketHandler;
+ BarterHandler *mBarterHandler;
MercenaryHandler *mMercenaryHandler;
RouletteHandler *mRouletteHandler;
SearchStoreHandler *mSearchStoreHandler;