3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/gui/screens/controllers/ClientInstanceScreenController.h"
7#include "mc/world/events/EventResult.h"
8#include "mc/world/events/NpcEventListener.h"
17namespace Json {
class Value; }
25 enum class InteractionState : schar {
35 ::ll::TypedStorage<8, 8, ::Player&> mPlayer;
36 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::INpcDialogueData>> mDialogueData;
37 ::ll::TypedStorage<1, 1, ::NpcDialogScreenController::InteractionState> mState;
42 NpcDialogScreenController& operator=(NpcDialogScreenController
const&);
43 NpcDialogScreenController(NpcDialogScreenController
const&);
44 NpcDialogScreenController();
49 virtual ~NpcDialogScreenController() =
default;
51 virtual void onCreation() ;
53 virtual void addStaticScreenVars(::Json::Value& globalVars) ;
55 virtual ::EventResult onNpcDialogueDataChange(::std::shared_ptr<::INpcDialogueData> data) ;
57 virtual ::EventResult onNpcInteractScreenClose(::ActorUniqueID npcId,
bool performClosingActions) ;
63 MCAPI NpcDialogScreenController(
64 ::std::shared_ptr<::ClientInstanceScreenModel> model,
66 ::std::shared_ptr<::INpcDialogueData> dialogueData
69 MCAPI ::Actor* _getActor()
const;
71 MCAPI
void _leaveScreen(
bool performClosingActions);
73 MCAPI
void _openUrl(::std::string
const& url);
75 MCAPI
void _performAction(::std::variant<::npc::CommandAction, ::npc::UrlAction>
const* action,
int index);
77 MCAPI
void _registerBindings();
79 MCAPI
void _registerEventHandlers();
81 MCAPI
void _runCloseActions();
83 MCAPI
void _runOpenActions();
90 ::std::shared_ptr<::ClientInstanceScreenModel> model,
92 ::std::shared_ptr<::INpcDialogueData> dialogueData
99 MCAPI
void $onCreation();
101 MCFOLD
void $addStaticScreenVars(::Json::Value& globalVars);
103 MCAPI ::EventResult $onNpcDialogueDataChange(::std::shared_ptr<::INpcDialogueData> data);
105 MCAPI ::EventResult $onNpcInteractScreenClose(::ActorUniqueID npcId,
bool performClosingActions);
Definition ClientInstanceScreenController.h:5
Definition ClientInstanceScreenModel.h:5
Definition NpcDialogScreenController.h:5
static MCAPI void ** $vftable()
static MCAPI void ** $vftableForScreenController()
static MCAPI void ** $vftableForEnableNonOwnerReferences()
Definition NpcEventListener.h:14
Definition ActorUniqueID.h:5
Definition INpcDialogueData.h:12
Definition CommandAction.h:17
Definition UrlAction.h:11