mirror of
https://github.com/Jous99/F4MP.git
synced 2026-01-12 23:20:53 +01:00
41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <World.h>
|
|
#include <Events/EventDispatcher.h>
|
|
#include <Games/Events.h>
|
|
|
|
struct NotifyQuestUpdate;
|
|
|
|
struct TESQuest;
|
|
|
|
/**
|
|
* @brief Handles quest sync
|
|
*
|
|
* This service is currently not in use.
|
|
*/
|
|
class QuestService final : public BSTEventSink<TESQuestStartStopEvent>, BSTEventSink<TESQuestStageEvent>
|
|
{
|
|
public:
|
|
QuestService(World&, entt::dispatcher&);
|
|
~QuestService() = default;
|
|
|
|
static bool IsNonSyncableQuest(TESQuest* apQuest);
|
|
static void DebugDumpQuests();
|
|
static bool StopQuest(uint32_t aformId);
|
|
|
|
private:
|
|
friend struct QuestEventHandler;
|
|
|
|
void OnConnected(const ConnectedEvent&) noexcept;
|
|
|
|
BSTEventResult OnEvent(const TESQuestStartStopEvent*, const EventDispatcher<TESQuestStartStopEvent>*) override;
|
|
BSTEventResult OnEvent(const TESQuestStageEvent*, const EventDispatcher<TESQuestStageEvent>*) override;
|
|
|
|
void OnQuestUpdate(const NotifyQuestUpdate&) noexcept;
|
|
|
|
World& m_world;
|
|
|
|
entt::scoped_connection m_joinedConnection;
|
|
entt::scoped_connection m_leftConnection;
|
|
entt::scoped_connection m_questUpdateConnection;
|
|
};
|