LeviLamina
Loading...
Searching...
No Matches
NpcDialogScreenController.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/screens/controllers/ClientInstanceScreenController.h"
7#include "mc/world/events/EventResult.h"
8#include "mc/world/events/NpcEventListener.h"
9
10// auto generated forward declare list
11// clang-format off
12class Actor;
14class Player;
15struct ActorUniqueID;
16struct INpcDialogueData;
17namespace Json { class Value; }
18namespace npc { struct CommandAction; }
19namespace npc { struct UrlAction; }
20// clang-format on
21
23public:
24 // NpcDialogScreenController inner types define
25 enum class InteractionState : schar {
26 None = 0,
27 Opened = 1,
28 Interacted = 2,
29 Closed = 3,
30 };
31
32public:
33 // member variables
34 // NOLINTBEGIN
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;
38 // NOLINTEND
39
40public:
41 // prevent constructor by default
42 NpcDialogScreenController& operator=(NpcDialogScreenController const&);
43 NpcDialogScreenController(NpcDialogScreenController const&);
44 NpcDialogScreenController();
45
46public:
47 // virtual functions
48 // NOLINTBEGIN
49 virtual ~NpcDialogScreenController() /*override*/ = default;
50
51 virtual void onCreation() /*override*/;
52
53 virtual void addStaticScreenVars(::Json::Value& globalVars) /*override*/;
54
55 virtual ::EventResult onNpcDialogueDataChange(::std::shared_ptr<::INpcDialogueData> data) /*override*/;
56
57 virtual ::EventResult onNpcInteractScreenClose(::ActorUniqueID npcId, bool performClosingActions) /*override*/;
58 // NOLINTEND
59
60public:
61 // member functions
62 // NOLINTBEGIN
63 MCAPI NpcDialogScreenController(
64 ::std::shared_ptr<::ClientInstanceScreenModel> model,
65 ::Player& player,
66 ::std::shared_ptr<::INpcDialogueData> dialogueData
67 );
68
69 MCAPI ::Actor* _getActor() const;
70
71 MCAPI void _leaveScreen(bool performClosingActions);
72
73 MCAPI void _openUrl(::std::string const& url);
74
75 MCAPI void _performAction(::std::variant<::npc::CommandAction, ::npc::UrlAction> const* action, int index);
76
77 MCAPI void _registerBindings();
78
79 MCAPI void _registerEventHandlers();
80
81 MCAPI void _runCloseActions();
82
83 MCAPI void _runOpenActions();
84 // NOLINTEND
85
86public:
87 // constructor thunks
88 // NOLINTBEGIN
89 MCAPI void* $ctor(
90 ::std::shared_ptr<::ClientInstanceScreenModel> model,
91 ::Player& player,
92 ::std::shared_ptr<::INpcDialogueData> dialogueData
93 );
94 // NOLINTEND
95
96public:
97 // virtual function thunks
98 // NOLINTBEGIN
99 MCAPI void $onCreation();
100
101 MCFOLD void $addStaticScreenVars(::Json::Value& globalVars);
102
103 MCAPI ::EventResult $onNpcDialogueDataChange(::std::shared_ptr<::INpcDialogueData> data);
104
105 MCAPI ::EventResult $onNpcInteractScreenClose(::ActorUniqueID npcId, bool performClosingActions);
106 // NOLINTEND
107
108public:
109 // vftables
110 // NOLINTBEGIN
111 MCNAPI static void** $vftable();
112
113 MCNAPI static void** $vftableForScreenController();
114
116 // NOLINTEND
117};
Definition Actor.h:106
Definition ClientInstanceScreenController.h:5
Definition ClientInstanceScreenModel.h:5
Definition Value.h:16
Definition NpcDialogScreenController.h:5
static MCAPI void ** $vftable()
static MCAPI void ** $vftableForScreenController()
static MCAPI void ** $vftableForEnableNonOwnerReferences()
Definition NpcEventListener.h:14
Definition Player.h:129
Definition ActorUniqueID.h:5
Definition INpcDialogueData.h:12
Definition CommandAction.h:17
Definition UrlAction.h:11