CommonLibSSE NG
BarrierProjectile.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSPointerHandle.h"
4 #include "RE/F/FormTypes.h"
5 #include "RE/P/Projectile.h"
6 
7 namespace RE
8 {
10  {
11  public:
12  inline static constexpr auto RTTI = RTTI_BarrierProjectile;
13  inline static constexpr auto VTABLE = VTABLE_BarrierProjectile;
14  inline static constexpr auto FORMTYPE = FormType::ProjectileBarrier;
15 
16  struct RecordFlags
17  {
18  enum RecordFlag : std::uint32_t
19  {
20  };
21  };
22 
24  {
26  std::uint32_t count; // 4
27  };
28  static_assert(sizeof(CollisionData) == 0x8);
29 
30  ~BarrierProjectile() override; // 00
31 
32  // override (Projectile)
33  void SaveGame(BGSSaveFormBuffer* a_buf) override; // 0E
34  void LoadGame(BGSLoadFormBuffer* a_buf) override; // 0F
35  void InitLoadGame(BGSLoadFormBuffer* a_buf) override; // 10
36  void FinishLoadGame(BGSLoadFormBuffer* a_buf) override; // 11
37  void Revert(BGSLoadFormBuffer* a_buf) override; // 12
38  void InitHavok() override; // 66
39  NiAVObject* Load3D(bool a_backgroundLoading) override; // 6A
40 #ifndef SKYRIM_CROSS_VR
41  bool IsBarrierProjectile() override; // A7 - { return 1; }
42  void UpdateImpl(float a_delta) override; // AB
43  bool ProcessImpacts() override; // AC
44  bool GetKillOnCollision() override; // B8 - { return 0; }
45 #endif
46 
48  {
49 #define BARRIER_RUNTIME_DATA_CONTENT \
50  float width; /* 1D8, 1E0 */ \
51  std::uint32_t pad1DC; /* 1DC */ \
52  BSTArray<CollisionData> collisionData; /* 1E0 */
53 
55  };
56 
57  [[nodiscard]] inline BARRIER_RUNTIME_DATA& GetBarrierRuntimeData() noexcept
58  {
59  return REL::RelocateMemberIfNewer<BARRIER_RUNTIME_DATA>(SKSE::RUNTIME_SSE_1_6_629, this, 0x1D8, 0x1E0);
60  }
61 
62  [[nodiscard]] inline const BARRIER_RUNTIME_DATA& GetBarrierRuntimeData() const noexcept
63  {
64  return REL::RelocateMemberIfNewer<BARRIER_RUNTIME_DATA>(SKSE::RUNTIME_SSE_1_6_629, this, 0x1D8, 0x1E0);
65  }
66 
67  // members
68 #ifndef ENABLE_SKYRIM_AE
70 #endif
71  };
72 #ifndef ENABLE_SKYRIM_AE
73  static_assert(sizeof(BarrierProjectile) == 0x1F8);
74 #endif
75 }
76 #undef BARRIER_RUNTIME_DATA_CONTENT
#define BARRIER_RUNTIME_DATA_CONTENT
Definition: BarrierProjectile.h:49
Definition: BGSLoadFormBuffer.h:11
Definition: BGSSaveFormBuffer.h:8
Definition: BarrierProjectile.h:10
void Revert(BGSLoadFormBuffer *a_buf) override
void InitHavok() override
BARRIER_RUNTIME_DATA & GetBarrierRuntimeData() noexcept
Definition: BarrierProjectile.h:57
bool GetKillOnCollision() override
bool IsBarrierProjectile() override
void FinishLoadGame(BGSLoadFormBuffer *a_buf) override
static constexpr auto RTTI
Definition: BarrierProjectile.h:12
const BARRIER_RUNTIME_DATA & GetBarrierRuntimeData() const noexcept
Definition: BarrierProjectile.h:62
void LoadGame(BGSLoadFormBuffer *a_buf) override
NiAVObject * Load3D(bool a_backgroundLoading) override
bool ProcessImpacts() override
static constexpr auto VTABLE
Definition: BarrierProjectile.h:13
static constexpr auto FORMTYPE
Definition: BarrierProjectile.h:14
void SaveGame(BGSSaveFormBuffer *a_buf) override
~BarrierProjectile() override
void UpdateImpl(float a_delta) override
void InitLoadGame(BGSLoadFormBuffer *a_buf) override
Definition: NiAVObject.h:50
Definition: Projectile.h:30
Definition: AbsorbEffect.h:6
constexpr std::array< REL::VariantID, 4 > VTABLE_BarrierProjectile
Definition: Offsets_VTABLE.h:2773
constexpr REL::VariantID RTTI_BarrierProjectile(687497, 395347, 0x1f1b1c0)
constexpr REL::Version RUNTIME_SSE_1_6_629(1, 6, 629, 0)
Definition: BarrierProjectile.h:48
Definition: BarrierProjectile.h:24
ObjectRefHandle ref
Definition: BarrierProjectile.h:25
std::uint32_t count
Definition: BarrierProjectile.h:26
Definition: BarrierProjectile.h:17
RecordFlag
Definition: BarrierProjectile.h:19