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