summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/net/eathena/protocol.h1
-rw-r--r--src/net/eathena/questhandler.cpp9
-rw-r--r--src/net/eathena/questhandler.h3
-rw-r--r--src/net/tmwa/questhandler.cpp6
-rw-r--r--src/net/tmwa/questhandler.h6
5 files changed, 24 insertions, 1 deletions
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index 55d179d21..ae8718087 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -369,6 +369,7 @@
#define CMSG_EXPLOSION_SPIRITS 0x01ed
#define CMSG_PVP_INFO 0x020f
#define CMSG_PLAYER_AUTO_REVIVE 0x0292
+#define CMSG_QUEST_ACTIVATE 0x02b6
#define CMSG_MAIL_REFRESH_INBOX 0x023f
#define CMSG_MAIL_READ_MESSAGE 0x0241
diff --git a/src/net/eathena/questhandler.cpp b/src/net/eathena/questhandler.cpp
index 18dbff5ee..3c26ae770 100644
--- a/src/net/eathena/questhandler.cpp
+++ b/src/net/eathena/questhandler.cpp
@@ -23,6 +23,7 @@
#include "gui/windows/skilldialog.h"
#include "gui/windows/questswindow.h"
+#include "net/eathena/messageout.h"
#include "net/eathena/protocol.h"
#include "resources/skillconsts.h"
@@ -180,4 +181,12 @@ void QuestHandler::processRemoveQuest(Net::MessageIn &msg)
}
}
+void QuestHandler::setQeustActiveState(const int questId,
+ const bool active) const
+{
+ MessageOut outMsg(CMSG_QUEST_ACTIVATE);
+ outMsg.writeInt32(questId, "quest id");
+ outMsg.writeInt8(active ? 1 : 0, "activate");
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/questhandler.h b/src/net/eathena/questhandler.h
index 17671970d..d1eca4e4b 100644
--- a/src/net/eathena/questhandler.h
+++ b/src/net/eathena/questhandler.h
@@ -37,6 +37,9 @@ class QuestHandler final : public MessageHandler, public Net::QuestHandler
void handleMessage(Net::MessageIn &msg) override final;
+ void setQeustActiveState(const int questId,
+ const bool active) const override final;
+
protected:
static void processAddQuest(Net::MessageIn &msg);
diff --git a/src/net/tmwa/questhandler.cpp b/src/net/tmwa/questhandler.cpp
index 3b8baac5e..b49db8f29 100644
--- a/src/net/tmwa/questhandler.cpp
+++ b/src/net/tmwa/questhandler.cpp
@@ -23,6 +23,7 @@
#include "gui/windows/skilldialog.h"
#include "gui/windows/questswindow.h"
+#include "net/tmwa/messageout.h"
#include "net/tmwa/protocol.h"
#include "resources/skillconsts.h"
@@ -96,4 +97,9 @@ void QuestHandler::processPlayerQuests(Net::MessageIn &msg)
questsWindow->rebuild(false);
}
+void QuestHandler::setQeustActiveState(const int questId A_UNUSED,
+ const bool active A_UNUSED) const
+{
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/questhandler.h b/src/net/tmwa/questhandler.h
index 51128a34d..046e41441 100644
--- a/src/net/tmwa/questhandler.h
+++ b/src/net/tmwa/questhandler.h
@@ -28,7 +28,8 @@
namespace TmwAthena
{
-class QuestHandler final : public MessageHandler, public Net::QuestHandler
+class QuestHandler final : public MessageHandler,
+ public Net::QuestHandler
{
public:
QuestHandler();
@@ -40,6 +41,9 @@ class QuestHandler final : public MessageHandler, public Net::QuestHandler
static void processSetQuestVar(Net::MessageIn &msg);
static void processPlayerQuests(Net::MessageIn &msg);
+
+ void setQeustActiveState(const int questId,
+ const bool active) const override final;
};
} // namespace TmwAthena