CommonLibSSE NG
BGSImpactManager.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSFixedString.h"
4 #include "RE/B/BSTArray.h"
5 #include "RE/B/BSTEvent.h"
6 #include "RE/B/BSTSingleton.h"
7 #include "RE/N/NiPoint3.h"
8 
9 namespace RE
10 {
11  class TESObjectREFR;
12  class BGSImpactDataSet;
13  struct BGSFootstepEvent;
14  struct BGSCombatImpactEvent;
15  struct BGSCollisionSoundEvent;
16  struct BSSoundHandle;
17 
19  public BSTEventSink<BGSFootstepEvent>, // 00
20  public BSTEventSink<BGSCombatImpactEvent>, // 08
21  public BSTEventSink<BGSCollisionSoundEvent>, // 10
22  public BSTSingletonSDM<BGSImpactManager> // 18
23  {
24  public:
26  {
27  public:
28  // members
34  bool playSound1; // 28
35  bool playSound2; // 29
36  bool unk2A; // 2A
37  void* unk30; // 30
38  };
39  static_assert(sizeof(ImpactSoundData) == 0x38);
40 
41  // override (BSTEventSink<BGSFootstepEvent>)
43 
44  // override (BSTEventSink<BGSCombatImpactEvent>)
45  BSEventNotifyControl ProcessEvent(const BGSCombatImpactEvent* a_event, BSTEventSource<BGSCombatImpactEvent>* a_eventSource) override; // 01
46 
47  // override (BSTEventSink<BGSCollisionSoundEvent>)
48  BSEventNotifyControl ProcessEvent(const BGSCollisionSoundEvent* a_event, BSTEventSource<BGSCollisionSoundEvent>* a_eventSource) override; // 01
49 
51  {
52  REL::Relocation<BGSImpactManager**> singleton{ RELOCATION_ID(515123, 401262) };
53  return *singleton;
54  }
55 
56  bool PlayImpactEffect(TESObjectREFR* a_ref, BGSImpactDataSet* a_impactEffect, const BSFixedString& a_nodeName, NiPoint3& a_pickDirection, float a_pickLength, bool a_applyNodeRotation, bool a_useNodeLocalRotation)
57  {
58  using func_t = decltype(&BGSImpactManager::PlayImpactEffect);
59  REL::Relocation<func_t> func{ RELOCATION_ID(35320, 36215) };
60  return func(this, a_ref, a_impactEffect, a_nodeName, a_pickDirection, a_pickLength, a_applyNodeRotation, a_useNodeLocalRotation);
61  }
62  bool PlayImpactDataSounds(ImpactSoundData& a_impactSoundData)
63  {
64  using func_t = decltype(&BGSImpactManager::PlayImpactDataSounds);
65  REL::Relocation<func_t> func{ RELOCATION_ID(35317, 36212) };
66  return func(this, a_impactSoundData);
67  }
68  };
69 }
#define RELOCATION_ID(a_se, a_ae)
Definition: PCH.h:724
Definition: Relocation.h:204
Definition: BGSImpactDataSet.h:13
Definition: BGSImpactData.h:16
Definition: BGSImpactManager.h:23
BSEventNotifyControl ProcessEvent(const BGSCollisionSoundEvent *a_event, BSTEventSource< BGSCollisionSoundEvent > *a_eventSource) override
bool PlayImpactDataSounds(ImpactSoundData &a_impactSoundData)
Definition: BGSImpactManager.h:62
BSEventNotifyControl ProcessEvent(const BGSCombatImpactEvent *a_event, BSTEventSource< BGSCombatImpactEvent > *a_eventSource) override
static BGSImpactManager * GetSingleton()
Definition: BGSImpactManager.h:50
bool PlayImpactEffect(TESObjectREFR *a_ref, BGSImpactDataSet *a_impactEffect, const BSFixedString &a_nodeName, NiPoint3 &a_pickDirection, float a_pickLength, bool a_applyNodeRotation, bool a_useNodeLocalRotation)
Definition: BGSImpactManager.h:56
BSEventNotifyControl ProcessEvent(const BGSFootstepEvent *a_event, BSTEventSource< BGSFootstepEvent > *a_eventSource) override
Definition: BSTEvent.h:143
Definition: NiAVObject.h:50
Definition: NiPoint3.h:6
Definition: TESObjectREFR.h:113
Definition: AbsorbEffect.h:6
BSEventNotifyControl
Definition: BSTEvent.h:12
Definition: BGSFootstepEvent.h:9
Definition: BGSImpactManager.h:26
BSSoundHandle * sound2
Definition: BGSImpactManager.h:33
bool playSound1
Definition: BGSImpactManager.h:34
NiAVObject * objectToFollow
Definition: BGSImpactManager.h:31
void * unk30
Definition: BGSImpactManager.h:37
BGSImpactData * impactData
Definition: BGSImpactManager.h:29
NiPoint3 * position
Definition: BGSImpactManager.h:30
bool playSound2
Definition: BGSImpactManager.h:35
BSSoundHandle * sound1
Definition: BGSImpactManager.h:32
bool unk2A
Definition: BGSImpactManager.h:36
Definition: BSSoundHandle.h:10
Definition: BSTSingleton.h:50