summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt5
-rw-r--r--src/Makefile.am5
-rw-r--r--src/net/attendancehandler.h45
-rw-r--r--src/net/eathena/attendancehandler.cpp42
-rw-r--r--src/net/eathena/attendancehandler.h40
-rw-r--r--src/net/eathena/generalhandler.cpp3
-rw-r--r--src/net/eathena/generalhandler.h2
-rw-r--r--src/net/net.cpp2
-rw-r--r--src/net/tmwa/attendancehandler.cpp38
-rw-r--r--src/net/tmwa/attendancehandler.h40
-rw-r--r--src/net/tmwa/generalhandler.cpp3
-rw-r--r--src/net/tmwa/generalhandler.h2
12 files changed, 227 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f055faa2a..c759e944b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -553,6 +553,7 @@ SET(SRCS
gui/windows/worldselectdialog.cpp
gui/windows/worldselectdialog.h
net/adminhandler.h
+ net/attendancehandler.h
net/character.h
net/characters.h
net/charserverhandler.cpp
@@ -1583,6 +1584,8 @@ SET(SRCS
net/eathena/adminrecv.h
net/eathena/adminhandler.cpp
net/eathena/adminhandler.h
+ net/eathena/attendancehandler.cpp
+ net/eathena/attendancehandler.h
net/eathena/auctionrecv.cpp
net/eathena/auctionrecv.h
net/eathena/auctionhandler.cpp
@@ -2013,6 +2016,8 @@ SET(SRCS_TMWA
gui/windows/shopselldialog.h
net/tmwa/adminhandler.cpp
net/tmwa/adminhandler.h
+ net/tmwa/attendancehandler.cpp
+ net/tmwa/attendancehandler.h
net/tmwa/beingrecv.cpp
net/tmwa/beingrecv.h
net/tmwa/beinghandler.cpp
diff --git a/src/Makefile.am b/src/Makefile.am
index 99018a570..1900f2af4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1565,6 +1565,7 @@ SRC = ${BASE_SRC} \
resources/map/walklayer.cpp \
resources/map/walklayer.h \
net/adminhandler.h \
+ net/attendancehandler.h \
net/beinghandler.h \
net/buysellhandler.h \
net/character.h \
@@ -1707,6 +1708,8 @@ SRC += \
gui/windows/shopselldialog.h \
net/tmwa/adminhandler.cpp \
net/tmwa/adminhandler.h \
+ net/tmwa/attendancehandler.cpp \
+ net/tmwa/attendancehandler.h \
net/tmwa/beingrecv.cpp \
net/tmwa/beingrecv.h \
net/tmwa/beinghandler.cpp \
@@ -1890,6 +1893,8 @@ SRC += gui/windows/bankwindow.cpp \
net/eathena/adminrecv.h \
net/eathena/adminhandler.cpp \
net/eathena/adminhandler.h \
+ net/eathena/attendancehandler.cpp \
+ net/eathena/attendancehandler.h \
net/eathena/auctionrecv.cpp \
net/eathena/auctionrecv.h \
net/eathena/auctionhandler.cpp \
diff --git a/src/net/attendancehandler.h b/src/net/attendancehandler.h
new file mode 100644
index 000000000..8f956eca2
--- /dev/null
+++ b/src/net/attendancehandler.h
@@ -0,0 +1,45 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2011-2018 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_ATTENDANCEHANDLER_H
+#define NET_ATTENDANCEHANDLER_H
+
+#include "localconsts.h"
+
+namespace Net
+{
+
+class AttendanceHandler notfinal
+{
+ public:
+ AttendanceHandler()
+ { }
+
+ A_DELETE_COPY(AttendanceHandler)
+
+ virtual ~AttendanceHandler()
+ { }
+};
+
+} // namespace Net
+
+extern Net::AttendanceHandler *attendanceHandler;
+
+#endif // NET_ATTENDANCEHANDLER_H
diff --git a/src/net/eathena/attendancehandler.cpp b/src/net/eathena/attendancehandler.cpp
new file mode 100644
index 000000000..0eef7ea1d
--- /dev/null
+++ b/src/net/eathena/attendancehandler.cpp
@@ -0,0 +1,42 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2011-2018 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/eathena/attendancehandler.h"
+
+#include "net/eathena/messageout.h"
+#include "net/eathena/protocolout.h"
+
+#include "debug.h"
+
+namespace EAthena
+{
+
+AttendanceHandler::AttendanceHandler()
+{
+ attendanceHandler = this;
+}
+
+AttendanceHandler::~AttendanceHandler()
+{
+ attendanceHandler = nullptr;
+}
+
+
+} // namespace EAthena
diff --git a/src/net/eathena/attendancehandler.h b/src/net/eathena/attendancehandler.h
new file mode 100644
index 000000000..363c1198c
--- /dev/null
+++ b/src/net/eathena/attendancehandler.h
@@ -0,0 +1,40 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2011-2018 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_EATHENA_ATTENDANCEHANDLER_H
+#define NET_EATHENA_ATTENDANCEHANDLER_H
+
+#include "net/attendancehandler.h"
+
+namespace EAthena
+{
+class AttendanceHandler final : public Net::AttendanceHandler
+{
+ public:
+ AttendanceHandler();
+
+ A_DELETE_COPY(AttendanceHandler)
+
+ ~AttendanceHandler() override final;
+};
+
+} // namespace EAthena
+
+#endif // NET_EATHENA_ATTENDANCEHANDLER_H
diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp
index 4f1d0c086..b2a640dbe 100644
--- a/src/net/eathena/generalhandler.cpp
+++ b/src/net/eathena/generalhandler.cpp
@@ -34,6 +34,7 @@
#include "net/eathena/adminhandler.h"
#include "net/eathena/auctionhandler.h"
+#include "net/eathena/attendancehandler.h"
#include "net/eathena/bankhandler.h"
#include "net/eathena/battlegroundhandler.h"
#include "net/eathena/beinghandler.h"
@@ -101,6 +102,7 @@ GeneralHandler::GeneralHandler() :
mMail2Handler(new Mail2Handler),
mMailHandler(new MailHandler),
mAuctionHandler(new AuctionHandler),
+ mAttendanceHandler(new AttendanceHandler),
mCashShopHandler(new CashShopHandler),
mFamilyHandler(new FamilyHandler),
mBankHandler(new BankHandler),
@@ -145,6 +147,7 @@ GeneralHandler::~GeneralHandler()
delete2(mMail2Handler);
delete2(mMailHandler);
delete2(mAuctionHandler);
+ delete2(mAttendanceHandler);
delete2(mCashShopHandler);
delete2(mFamilyHandler);
delete2(mBankHandler);
diff --git a/src/net/eathena/generalhandler.h b/src/net/eathena/generalhandler.h
index 8f6dc5166..485670194 100644
--- a/src/net/eathena/generalhandler.h
+++ b/src/net/eathena/generalhandler.h
@@ -48,6 +48,7 @@ class TradeHandler;
class QuestHandler;
class ServerFeatures;
class AuctionHandler;
+class AttendanceHandler;
class BankHandler;
class BattleGroundHandler;
class BuyingStoreHandler;
@@ -115,6 +116,7 @@ class GeneralHandler final : public Net::GeneralHandler
Mail2Handler *mMail2Handler;
MailHandler *mMailHandler;
AuctionHandler *mAuctionHandler;
+ AttendanceHandler *mAttendanceHandler;
CashShopHandler *mCashShopHandler;
FamilyHandler *mFamilyHandler;
BankHandler *mBankHandler;
diff --git a/src/net/net.cpp b/src/net/net.cpp
index e7720bb76..2d608c9eb 100644
--- a/src/net/net.cpp
+++ b/src/net/net.cpp
@@ -41,6 +41,7 @@ int evolPacketOffset = 0;
namespace Net
{
class AuctionHandler;
+ class AttendanceHandler;
class BankHandler;
class BattleGroundHandler;
class BuyingStoreHandler;
@@ -95,6 +96,7 @@ Net::BeingHandler *beingHandler = nullptr;
Net::BuySellHandler *buySellHandler = nullptr;
Net::ServerFeatures *serverFeatures = nullptr;
Net::AuctionHandler *auctionHandler = nullptr;
+Net::AuctionHandler *attendanceHandler = nullptr;
Net::BankHandler *bankHandler = nullptr;
Net::BattleGroundHandler *battleGroundHandler = nullptr;
Net::BuyingStoreHandler *buyingStoreHandler = nullptr;
diff --git a/src/net/tmwa/attendancehandler.cpp b/src/net/tmwa/attendancehandler.cpp
new file mode 100644
index 000000000..12749d325
--- /dev/null
+++ b/src/net/tmwa/attendancehandler.cpp
@@ -0,0 +1,38 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2011-2018 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/attendancehandler.h"
+
+#include "debug.h"
+
+namespace TmwAthena
+{
+
+AttendanceHandler::AttendanceHandler()
+{
+ attendanceHandler = this;
+}
+
+AttendanceHandler::~AttendanceHandler()
+{
+ attendanceHandler = nullptr;
+}
+
+} // namespace TmwAthena
diff --git a/src/net/tmwa/attendancehandler.h b/src/net/tmwa/attendancehandler.h
new file mode 100644
index 000000000..3ec9d4b62
--- /dev/null
+++ b/src/net/tmwa/attendancehandler.h
@@ -0,0 +1,40 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2011-2018 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_ATTENDANCEHANDLER_H
+#define NET_TMWA_ATTENDANCEHANDLER_H
+
+#include "net/attendancehandler.h"
+
+namespace TmwAthena
+{
+class AttendanceHandler final : public Net::AttendanceHandler
+{
+ public:
+ AttendanceHandler();
+
+ A_DELETE_COPY(AttendanceHandler)
+
+ ~AttendanceHandler() override final;
+};
+
+} // namespace TmwAthena
+
+#endif // NET_TMWA_ATTENDANCEHANDLER_H
diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp
index f61342e5f..625bbbb8e 100644
--- a/src/net/tmwa/generalhandler.cpp
+++ b/src/net/tmwa/generalhandler.cpp
@@ -52,6 +52,7 @@
#include "net/tmwa/questhandler.h"
#include "net/tmwa/auctionhandler.h"
+#include "net/tmwa/attendancehandler.h"
#include "net/tmwa/bankhandler.h"
#include "net/tmwa/battlegroundhandler.h"
#include "net/tmwa/buyingstorehandler.h"
@@ -98,6 +99,7 @@ GeneralHandler::GeneralHandler() :
mQuestHandler(new QuestHandler),
mServerFeatures(new ServerFeatures),
mAuctionHandler(new AuctionHandler),
+ mAttendanceHandler(new AttendanceHandler),
mBankHandler(new BankHandler),
mBattleGroundHandler(new BattleGroundHandler),
mBuyingStoreHandler(new BuyingStoreHandler),
@@ -142,6 +144,7 @@ GeneralHandler::~GeneralHandler()
delete2(mQuestHandler);
delete2(mServerFeatures);
delete2(mAuctionHandler);
+ delete2(mAttendanceHandler);
delete2(mBankHandler);
delete2(mBattleGroundHandler);
delete2(mBuyingStoreHandler);
diff --git a/src/net/tmwa/generalhandler.h b/src/net/tmwa/generalhandler.h
index 8c80c504f..ef2d98969 100644
--- a/src/net/tmwa/generalhandler.h
+++ b/src/net/tmwa/generalhandler.h
@@ -47,6 +47,7 @@ class TradeHandler;
class QuestHandler;
class ServerFeatures;
class AuctionHandler;
+class AttendanceHandler;
class BankHandler;
class BattleGroundHandler;
class BuyingStoreHandler;
@@ -112,6 +113,7 @@ class GeneralHandler final : public Net::GeneralHandler
QuestHandler *mQuestHandler;
ServerFeatures *mServerFeatures;
AuctionHandler *mAuctionHandler;
+ AttendanceHandler *mAttendanceHandler;
BankHandler *mBankHandler;
BattleGroundHandler *mBattleGroundHandler;
BuyingStoreHandler *mBuyingStoreHandler;