CommonLibSSE (powerof3)
BSTempEffect.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/N/NiObject.h"
4 
5 namespace RE
6 {
7  class BGSLoadGameBuffer;
8  class BGSSaveGameBuffer;
9  class NiAVObject;
10  class TESObjectCELL;
11 
12  enum class TEMP_EFFECT_TYPE
13  {
14  kTerrain = 0,
15  kWeaponBlood = 1,
16  kDecal = 2,
17  kGeometryDecal = 3,
18  kParticle = 4,
19  kDebris = 5,
20  kSPG = 6,
21  kDefault = 7,
22  kRefDefault = 8,
23  kRefModel = 9,
24  kRefShader = 10,
25  kMagicSummon = 11
26  };
27 
28  class BSTempEffect : public NiObject
29  {
30  public:
31  inline static constexpr auto RTTI = RTTI_BSTempEffect;
32  inline static constexpr auto Ni_RTTI = NiRTTI_BSTempEffect;
33  inline static constexpr auto VTABLE = VTABLE_BSTempEffect;
34  inline static constexpr auto TYPE = TEMP_EFFECT_TYPE::kDefault;
35 
36  ~BSTempEffect() override; // 00
37 
38  // override (NiObject)
39  const NiRTTI* GetRTTI() const override; // 02
40  NiNode* AsNode() override; // 03 - { return 0; }
41  NiSwitchNode* AsSwitchNode() override; // 04 - { return 0; }
42  BSFadeNode* AsFadeNode() override; // 05 - { return 0; }
43  BSMultiBoundNode* AsMultiBoundNode() override; // 06 - { return 0; }
44  BSGeometry* AsGeometry() override; // 07 - { return 0; }
45  NiTriStrips* AsTriStrips() override; // 08 - { return 0; }
46  BSTriShape* AsTriShape() override; // 09 - { return 0; }
47  BSSegmentedTriShape* AsSegmentedTriShape() override; // 0A - { return 0; }
48  BSSubIndexTriShape* AsSubIndexTriShape() override; // 0B - { return 0; }
49  BSDynamicTriShape* AsDynamicTriShape() override; // 0C - { return 0; }
50  NiGeometry* AsNiGeometry() override; // 0D - { return 0; }
51  NiTriBasedGeom* AsNiTriBasedGeom() override; // 0E - { return 0; }
52  NiTriShape* AsNiTriShape() override; // 0F - { return 0; }
53  NiParticles* AsParticlesGeom() override; // 10 - { return 0; }
54  BSLines* AsLinesGeom() override; // 11 - { return 0; }
55  bhkNiCollisionObject* AsBhkNiCollisionObject() override; // 12 - { return 0; }
56  bhkBlendCollisionObject* AsBhkBlendCollisionObject() override; // 13 - { return 0; }
57  bhkAttachmentCollisionObject* AsBhkAttachmentCollisionObject() override; // 14 - { return 0; }
58  bhkRigidBody* AsBhkRigidBody() override; // 15 - { return 0; }
59  bhkLimitedHingeConstraint* AsBhkLimitedHingeConstraint() override; // 16 - { return 0; }
60 
61  // add
62  virtual void Initialize(); // 25 - { initialized = true; }
63  virtual void Attach(); // 26 - { return; }
64  virtual void Detach(); // 27 - { return; }
65  virtual bool Update(float a_arg1); // 28
66  [[nodiscard]] virtual NiAVObject* Get3D() const; // 29 - { return 0; }
67  [[nodiscard]] virtual bool GetManagerHandlesSaveLoad() const; // 2A - { return true; }
68  [[nodiscard]] virtual bool GetClearWhenCellIsUnloaded() const; // 2B - { return true; }
69  [[nodiscard]] virtual TEMP_EFFECT_TYPE GetType() const; // 2C - { return 7; }
70  virtual void SaveGame(BGSSaveGameBuffer* a_buf); // 2D
71  virtual void LoadGame(BGSLoadGameBuffer* a_buf); // 2E
72  virtual void FinishLoadGame(BGSLoadGameBuffer* a_buf); // 2F - { return; }
73  [[nodiscard]] virtual bool IsInterfaceEffect() const; // 30 - { return false; }
74  virtual void SetInterfaceEffect(bool a_set); // 31 - { return; }
75  [[nodiscard]] virtual bool GetStackable() const; // 32 - { return false; }
76  virtual bool GetStackableMatch(BSTempEffect* a_effect) const; // 33 - { return false; }
77  virtual void Push(); // 34 - { return; }
78  virtual void Pop(); // 35 - { return; }
79 
80  template <
81  class T,
82  class = std::enable_if_t<
83  std::negation_v<
84  std::disjunction<
85  std::is_pointer<T>,
86  std::is_reference<T>,
87  std::is_const<T>,
88  std::is_volatile<T>>>>>
89  [[nodiscard]] T* As() noexcept;
90 
91  template <
92  class T,
93  class = std::enable_if_t<
94  std::negation_v<
95  std::disjunction<
96  std::is_pointer<T>,
97  std::is_reference<T>,
98  std::is_const<T>,
99  std::is_volatile<T>>>>>
100  [[nodiscard]] const T* As() const noexcept;
101 
102  // members
103  float lifetime; // 10
104  std::uint32_t pad14; // 14
106  float age; // 20
107  bool initialized; // 24
108  std::uint8_t pad25; // 25
109  std::uint16_t pad26; // 26
110  std::uint32_t effectID; // 28
111  std::uint32_t pad2C; // 2C
112  };
113  static_assert(sizeof(BSTempEffect) == 0x30);
114 }
Definition: BGSLoadGameBuffer.h:6
Definition: BGSSaveGameBuffer.h:10
Definition: BSDynamicTriShape.h:8
Definition: BSFadeNode.h:11
Definition: BSGeometry.h:15
Definition: BSMultiBoundNode.h:14
Definition: BSTempEffect.h:29
virtual void LoadGame(BGSLoadGameBuffer *a_buf)
BSSegmentedTriShape * AsSegmentedTriShape() override
bhkAttachmentCollisionObject * AsBhkAttachmentCollisionObject() override
NiTriStrips * AsTriStrips() override
virtual bool GetStackableMatch(BSTempEffect *a_effect) const
virtual void FinishLoadGame(BGSLoadGameBuffer *a_buf)
virtual bool GetStackable() const
std::uint16_t pad26
Definition: BSTempEffect.h:109
BSGeometry * AsGeometry() override
NiTriShape * AsNiTriShape() override
static constexpr auto Ni_RTTI
Definition: BSTempEffect.h:32
virtual void Attach()
static constexpr auto RTTI
Definition: BSTempEffect.h:31
BSLines * AsLinesGeom() override
virtual void SetInterfaceEffect(bool a_set)
BSTriShape * AsTriShape() override
T * As() noexcept
Definition: TempEffectTraits.h:26
BSSubIndexTriShape * AsSubIndexTriShape() override
std::uint32_t pad2C
Definition: BSTempEffect.h:111
static constexpr auto TYPE
Definition: BSTempEffect.h:34
virtual TEMP_EFFECT_TYPE GetType() const
bhkBlendCollisionObject * AsBhkBlendCollisionObject() override
BSMultiBoundNode * AsMultiBoundNode() override
TESObjectCELL * cell
Definition: BSTempEffect.h:105
bhkNiCollisionObject * AsBhkNiCollisionObject() override
~BSTempEffect() override
virtual bool IsInterfaceEffect() const
virtual bool GetClearWhenCellIsUnloaded() const
virtual void Initialize()
static constexpr auto VTABLE
Definition: BSTempEffect.h:33
virtual void Push()
float lifetime
Definition: BSTempEffect.h:103
NiParticles * AsParticlesGeom() override
BSDynamicTriShape * AsDynamicTriShape() override
NiNode * AsNode() override
float age
Definition: BSTempEffect.h:106
bhkLimitedHingeConstraint * AsBhkLimitedHingeConstraint() override
virtual bool Update(float a_arg1)
bool initialized
Definition: BSTempEffect.h:107
NiGeometry * AsNiGeometry() override
virtual NiAVObject * Get3D() const
bhkRigidBody * AsBhkRigidBody() override
BSFadeNode * AsFadeNode() override
NiTriBasedGeom * AsNiTriBasedGeom() override
std::uint32_t effectID
Definition: BSTempEffect.h:110
virtual void Detach()
NiSwitchNode * AsSwitchNode() override
virtual void Pop()
std::uint8_t pad25
Definition: BSTempEffect.h:108
const NiRTTI * GetRTTI() const override
virtual void SaveGame(BGSSaveGameBuffer *a_buf)
std::uint32_t pad14
Definition: BSTempEffect.h:104
virtual bool GetManagerHandlesSaveLoad() const
Definition: BSTriShape.h:8
Definition: NiAVObject.h:51
Definition: NiGeometry.h:11
Definition: NiNode.h:12
Definition: NiObject.h:37
Definition: NiParticles.h:10
Definition: NiRTTI.h:6
Definition: NiTriShape.h:8
Definition: TESObjectCELL.h:115
Definition: bhkNiCollisionObject.h:11
Definition: bhkRigidBody.h:15
Definition: AbsorbEffect.h:6
TEMP_EFFECT_TYPE
Definition: BSTempEffect.h:13
constexpr REL::ID NiRTTI_BSTempEffect(static_cast< std::uint64_t >(515912))
constexpr REL::ID RTTI_BSTempEffect(static_cast< std::uint64_t >(686036))
constexpr std::array< REL::ID, 1 > VTABLE_BSTempEffect
Definition: Offsets_VTABLE.h:10538
Definition: EffectArchetypes.h:65