CommonLibSSE NG
ArrowProjectile.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/F/FormTypes.h"
5 
6 namespace RE
7 {
8  class AlchemyItem;
9  class EnchantmentItem;
10 
12  {
13  public:
14  inline static constexpr auto RTTI = RTTI_ArrowProjectile;
15  inline static constexpr auto VTABLE = VTABLE_ArrowProjectile;
16  inline static constexpr auto FORMTYPE = FormType::ProjectileArrow;
17 
18  struct RecordFlags
19  {
20  enum RecordFlag : std::uint32_t
21  {
22  };
23  };
24 
25  ~ArrowProjectile() override; // 00
26 
27  // override (MissileProjectile)
28  void SaveGame(BGSSaveFormBuffer* a_buf) override; // 0E
29  void LoadGame(BGSLoadFormBuffer* a_buf) override; // 0F
30 #ifndef SKYRIM_CROSS_VR
31  void PostLoad3D(NiAVObject* a_root) override; // AA
32  void UpdateImpl(float a_delta) override; // AB
33  bool ProcessImpacts() override; // AC
34  void Update3D() override; // AD
35  float GetPowerSpeedMult() const override; // AF
36  float GetWeaponSpeedMult() const override; // B0
37  bool GetStopMainSoundAfterImpact() override; // B1 - { return 1; }
38  float GetGravity() override; // B5
39  bool ShouldBeLimited() override; // B9 - { return (unk1CC >> 22) & 1; }
40  void AddImpact(TESObjectREFR* a_ref, const NiPoint3& a_targetLoc, const NiPoint3& a_velocity, hkpCollidable* a_collidable, std::int32_t a_arg6, std::uint32_t a_arg7) override; // BD
41  void Handle3DLoaded() override; // C0
42  void Unk_C2(void) override; // C2 - { return 1; }
43  void Unk_C3(void) override; // C3 - { return 1; }
44 #endif
45 
47  {
48 #define ARROW_RUNTIME_DATA_CONTENT \
49  EnchantmentItem* enchantItem; /* 1E0, 1E8 */ \
50  AlchemyItem* poison; /* 1E8 */
51 
53  };
54 
55  [[nodiscard]] inline ARROW_RUNTIME_DATA& GetArrowRuntimeData() noexcept
56  {
57  return REL::RelocateMemberIfNewer<ARROW_RUNTIME_DATA>(SKSE::RUNTIME_SSE_1_6_629, this, 0x1E0, 0x1E8);
58  }
59 
60  [[nodiscard]] inline const ARROW_RUNTIME_DATA& GetArrowRuntimeData() const noexcept
61  {
62  return REL::RelocateMemberIfNewer<ARROW_RUNTIME_DATA>(SKSE::RUNTIME_SSE_1_6_629, this, 0x1E0, 0x1E8);
63  }
64 
65  // members
66 #ifndef ENABLE_SKYRIM_AE
68 #endif
69  };
70 #ifndef ENABLE_SKYRIM_AE
71  static_assert(sizeof(ArrowProjectile) == 0x1F0);
72 #endif
73 }
74 #undef ARROW_RUNTIME_DATA_CONTENT
#define ARROW_RUNTIME_DATA_CONTENT
Definition: ArrowProjectile.h:48
Definition: ArrowProjectile.h:12
void SaveGame(BGSSaveFormBuffer *a_buf) override
void Unk_C3(void) override
float GetWeaponSpeedMult() const override
void Unk_C2(void) override
void UpdateImpl(float a_delta) override
void Handle3DLoaded() override
void PostLoad3D(NiAVObject *a_root) override
void LoadGame(BGSLoadFormBuffer *a_buf) override
float GetGravity() override
ARROW_RUNTIME_DATA & GetArrowRuntimeData() noexcept
Definition: ArrowProjectile.h:55
bool ShouldBeLimited() override
void Update3D() override
void AddImpact(TESObjectREFR *a_ref, const NiPoint3 &a_targetLoc, const NiPoint3 &a_velocity, hkpCollidable *a_collidable, std::int32_t a_arg6, std::uint32_t a_arg7) override
~ArrowProjectile() override
static constexpr auto RTTI
Definition: ArrowProjectile.h:14
float GetPowerSpeedMult() const override
bool ProcessImpacts() override
bool GetStopMainSoundAfterImpact() override
const ARROW_RUNTIME_DATA & GetArrowRuntimeData() const noexcept
Definition: ArrowProjectile.h:60
static constexpr auto FORMTYPE
Definition: ArrowProjectile.h:16
static constexpr auto VTABLE
Definition: ArrowProjectile.h:15
Definition: BGSLoadFormBuffer.h:11
Definition: BGSSaveFormBuffer.h:8
Definition: MissileProjectile.h:10
Definition: NiAVObject.h:50
Definition: NiPoint3.h:6
Definition: TESObjectREFR.h:113
Definition: hkpCollidable.h:13
Definition: AbsorbEffect.h:6
constexpr REL::VariantID RTTI_ArrowProjectile(687494, 395344, 0x1f1b138)
constexpr std::array< REL::VariantID, 4 > VTABLE_ArrowProjectile
Definition: Offsets_VTABLE.h:2771
constexpr REL::Version RUNTIME_SSE_1_6_629(1, 6, 629, 0)
Definition: ArrowProjectile.h:47
Definition: ArrowProjectile.h:19
RecordFlag
Definition: ArrowProjectile.h:21