CommonLibSSE (Parapets fork)
Loading...
Searching...
No Matches
ScriptEventSourceHolder.h
Go to the documentation of this file.
1#pragma once
2
3#include "RE/B/BSTEvent.h"
5
6namespace RE
7{
8 class TESObjectREFR;
9 struct BGSEventProcessedEvent;
10 struct TESActivateEvent;
11 struct TESActiveEffectApplyRemoveEvent;
12 struct TESActorLocationChangeEvent;
13 struct TESBookReadEvent;
14 struct TESCellAttachDetachEvent;
15 struct TESCellFullyLoadedEvent;
16 struct TESCellReadyToApplyDecalsEvent;
17 struct TESCombatEvent;
18 struct TESContainerChangedEvent;
19 struct TESDeathEvent;
20 struct TESDestructionStageChangedEvent;
21 struct TESEnterBleedoutEvent;
22 struct TESEquipEvent;
23 struct TESFastTravelEndEvent;
24 struct TESFormDeleteEvent;
25 struct TESFurnitureEvent;
26 struct TESGrabReleaseEvent;
27 struct TESHitEvent;
28 struct TESInitScriptEvent;
29 struct TESLoadGameEvent;
30 struct TESLockChangedEvent;
31 struct TESMagicEffectApplyEvent;
32 struct TESMagicWardHitEvent;
33 struct TESMoveAttachDetachEvent;
34 struct TESObjectLoadedEvent;
35 struct TESObjectREFRTranslationEvent;
36 struct TESOpenCloseEvent;
37 struct TESPackageEvent;
38 struct TESPerkEntryRunEvent;
39 struct TESPlayerBowShotEvent;
40 struct TESQuestInitEvent;
41 struct TESQuestStageEvent;
42 struct TESQuestStageItemDoneEvent;
43 struct TESQuestStartStopEvent;
44 struct TESResetEvent;
45 struct TESResolveNPCTemplatesEvent;
46 struct TESSceneActionEvent;
47 struct TESSceneEvent;
48 struct TESScenePhaseEvent;
49 struct TESSellEvent;
50 struct TESSleepStartEvent;
51 struct TESSleepStopEvent;
52 struct TESSpellCastEvent;
53 struct TESSwitchRaceCompleteEvent;
54 struct TESTopicInfoEvent;
55 struct TESTrackedStatsEvent;
56 struct TESTrapHitEvent;
57 struct TESTriggerEnterEvent;
58 struct TESTriggerEvent;
59 struct TESTriggerLeaveEvent;
60 struct TESUniqueIDChangeEvent;
61 struct TESWaitStartEvent;
62 struct TESWaitStopEvent;
63
65 public BSTEventSource<BGSEventProcessedEvent>, // 0000
66 public BSTEventSource<TESActivateEvent>, // 0058
67 public BSTEventSource<TESActiveEffectApplyRemoveEvent>, // 00B0
68 public BSTEventSource<TESActorLocationChangeEvent>, // 0108
69 public BSTEventSource<TESBookReadEvent>, // 0160
70 public BSTEventSource<TESCellAttachDetachEvent>, // 01B8
71 public BSTEventSource<TESCellFullyLoadedEvent>, // 0210
72 public BSTEventSource<TESCellReadyToApplyDecalsEvent>, // 0268
73 public BSTEventSource<TESCombatEvent>, // 02C0
74 public BSTEventSource<TESContainerChangedEvent>, // 0318
75 public BSTEventSource<TESDeathEvent>, // 0370
76 public BSTEventSource<TESDestructionStageChangedEvent>, // 03C8
77 public BSTEventSource<TESEnterBleedoutEvent>, // 0420
78 public BSTEventSource<TESEquipEvent>, // 0478
79 public BSTEventSource<TESFormDeleteEvent>, // 04D0
80 public BSTEventSource<TESFurnitureEvent>, // 0528
81 public BSTEventSource<TESGrabReleaseEvent>, // 0580
82 public BSTEventSource<TESHitEvent>, // 05D8
83 public BSTEventSource<TESInitScriptEvent>, // 0630
84 public BSTEventSource<TESLoadGameEvent>, // 0688
85 public BSTEventSource<TESLockChangedEvent>, // 06E0
86 public BSTEventSource<TESMagicEffectApplyEvent>, // 0738
87 public BSTEventSource<TESMagicWardHitEvent>, // 0790
88 public BSTEventSource<TESMoveAttachDetachEvent>, // 07E8
89 public BSTEventSource<TESObjectLoadedEvent>, // 0840
90 public BSTEventSource<TESObjectREFRTranslationEvent>, // 0898
91 public BSTEventSource<TESOpenCloseEvent>, // 08F0
92 public BSTEventSource<TESPackageEvent>, // 0948
93 public BSTEventSource<TESPerkEntryRunEvent>, // 09A0
94 public BSTEventSource<TESQuestInitEvent>, // 09F8
95 public BSTEventSource<TESQuestStageEvent>, // 0A50
96 public BSTEventSource<TESQuestStageItemDoneEvent>, // 0AA8
97 public BSTEventSource<TESQuestStartStopEvent>, // 0B00
98 public BSTEventSource<TESResetEvent>, // 0B58
99 public BSTEventSource<TESResolveNPCTemplatesEvent>, // 0BB0
100 public BSTEventSource<TESSceneEvent>, // 0C08
101 public BSTEventSource<TESSceneActionEvent>, // 0C60
102 public BSTEventSource<TESScenePhaseEvent>, // 0CB8
103 public BSTEventSource<TESSellEvent>, // 0D10
104 public BSTEventSource<TESSleepStartEvent>, // 0D68
105 public BSTEventSource<TESSleepStopEvent>, // 0DC0
106 public BSTEventSource<TESSpellCastEvent>, // 0E18
107 public BSTEventSource<TESPlayerBowShotEvent>, // 0E70
108 public BSTEventSource<TESTopicInfoEvent>, // 0EC8
109 public BSTEventSource<TESTrackedStatsEvent>, // 0F20
110 public BSTEventSource<TESTrapHitEvent>, // 0F78
111 public BSTEventSource<TESTriggerEvent>, // 0FD0
112 public BSTEventSource<TESTriggerEnterEvent>, // 1028
113 public BSTEventSource<TESTriggerLeaveEvent>, // 1080
114 public BSTEventSource<TESUniqueIDChangeEvent>, // 10D8
115 public BSTEventSource<TESWaitStartEvent>, // 1130 - ?
116 public BSTEventSource<TESWaitStopEvent>, // 1188 - ?
117 public BSTEventSource<TESSwitchRaceCompleteEvent>, // 11E0
118 public BSTEventSource<TESFastTravelEndEvent> // 1238
119 {
120 public:
122
123 void SendActivateEvent(const NiPointer<TESObjectREFR>& a_objectActivated, const NiPointer<TESObjectREFR>& a_actionRef);
124 void SendOpenCloseEvent(const NiPointer<TESObjectREFR>& a_ref, const NiPointer<TESObjectREFR>& a_activeRef, bool a_isOpened);
125
126 template <class T>
128 {
129 return static_cast<BSTEventSource<T>*>(this);
130 }
131
132 template <class T>
133 inline void AddEventSink(BSTEventSink<T>* a_sink)
134 {
135 GetEventSource<T>()->AddEventSink(a_sink);
136 }
137
138 template <class T>
139 inline void RemoveEventSink(BSTEventSink<T>* a_sink)
140 {
141 GetEventSource<T>()->RemoveEventSink(a_sink);
142 }
143
144 template <class T>
145 inline void SendEvent(const T* a_event)
146 {
147 GetEventSource<T>()->SendEvent(a_event);
148 }
149 };
150 static_assert(sizeof(ScriptEventSourceHolder) == 0x1290);
151}
Definition: BSTEvent.h:146
Definition: BSTEvent.h:28
Definition: NiSmartPointer.h:9
Definition: ScriptEventSourceHolder.h:119
void SendEvent(const T *a_event)
Definition: ScriptEventSourceHolder.h:145
void SendOpenCloseEvent(const NiPointer< TESObjectREFR > &a_ref, const NiPointer< TESObjectREFR > &a_activeRef, bool a_isOpened)
static ScriptEventSourceHolder * GetSingleton()
BSTEventSource< T > * GetEventSource()
Definition: ScriptEventSourceHolder.h:127
void SendActivateEvent(const NiPointer< TESObjectREFR > &a_objectActivated, const NiPointer< TESObjectREFR > &a_actionRef)
void AddEventSink(BSTEventSink< T > *a_sink)
Definition: ScriptEventSourceHolder.h:133
void RemoveEventSink(BSTEventSink< T > *a_sink)
Definition: ScriptEventSourceHolder.h:139
Definition: AbsorbEffect.h:6