CommonLibSSE (Parapets fork)
TESObjectACTI.h
Go to the documentation of this file.
1 #pragma once
2 
4 #include "RE/B/BGSKeywordForm.h"
6 #include "RE/F/FormTypes.h"
8 #include "RE/T/TESFullName.h"
11 
12 namespace RE
13 {
14  class TESObjectACTI :
15  public TESBoundAnimObject, // 00
16  public TESFullName, // 30
17  public TESModelTextureSwap, // 40
18  public TESMagicTargetForm, // A8
19  public BGSDestructibleObjectForm, // 78
20  public BGSOpenCloseForm, // 88
21  public BGSKeywordForm // 90
22  {
23  public:
24  inline static constexpr auto RTTI = RTTI_TESObjectACTI;
25  inline static constexpr auto FORMTYPE = FormType::Activator;
26 
27  enum class ActiFlags
28  {
29  kNone = 0,
30  kNoDisplacement = 1 << 0,
31  kIgnoredBySandbox = 1 << 1,
32  kIsProceduralWater = 1 << 2,
33  kIsLODWater = 1 << 3
34  };
35 
36  struct RecordFlags
37  {
38  enum RecordFlag : std::uint32_t
39  {
40  kDeleted = 1 << 5,
41  kHasTreeLOD = 1 << 6,
42  kMustUpdateAnims = 1 << 8,
44  kIgnored = 1 << 12,
45  kHasDistantLOD = 1 << 15,
46  kRandomAnimStart = 1 << 16,
47  kDangerous = 1 << 17,
49  kIsMarker = 1 << 23,
50  kObstacle = 1 << 25,
53  kChildCanUse = 1 << 29,
55  };
56  };
57 
58  ~TESObjectACTI() override; // 00
59 
60  // override (TESBoundAnimObject)
61  void InitializeData() override; // 04
62  void ClearData() override; // 05
63  bool Load(TESFile* a_mod) override; // 06
64  void SaveGame(BGSSaveFormBuffer* a_buf) override; // 0E
65  void LoadGame(BGSLoadFormBuffer* a_buf) override; // 0F
66  void InitItemImpl() override; // 13
67  bool GetIgnoredBySandbox() const override; // 22 - { return (flags >> 1) & 1; }
68  bool IsWater() const override; // 2A - { return waterType != 0; }
69  bool Activate(TESObjectREFR* a_targetRef, TESObjectREFR* a_activatorRef, std::uint8_t a_arg3, TESBoundObject* a_object, std::int32_t a_targetCount) override; // 37
70  TESWaterForm* GetWaterType() const override; // 3D - { return waterType; }
71  bool GetActivateText(TESObjectREFR* a_activator, BSString& a_dst) override; // 4C
72  bool CalculateDoFavor(Actor* a_activator, bool a_arg2, TESObjectREFR* a_toActivate, float a_arg3) override; // 4D
73 
74  // members
77  TESWaterForm* waterForm; // B8 - WNAM
79  std::uint16_t padC2; // C2
80  std::uint32_t padC4; // C4
81  };
82  static_assert(sizeof(TESObjectACTI) == 0xC8);
83 }
Definition: Actor.h:134
Definition: BGSDestructibleObjectForm.h:61
Definition: BGSKeywordForm.h:10
Definition: BGSOpenCloseForm.h:9
Definition: BGSSoundDescriptorForm.h:14
Definition: TESBoundAnimObject.h:8
Definition: TESBoundObject.h:24
Definition: TESFile.h:14
Definition: TESFullName.h:9
Definition: TESMagicTargetForm.h:6
Definition: TESModelTextureSwap.h:10
Definition: TESObjectACTI.h:22
bool GetActivateText(TESObjectREFR *a_activator, BSString &a_dst) override
bool Activate(TESObjectREFR *a_targetRef, TESObjectREFR *a_activatorRef, std::uint8_t a_arg3, TESBoundObject *a_object, std::int32_t a_targetCount) override
BGSSoundDescriptorForm * soundActivate
Definition: TESObjectACTI.h:76
~TESObjectACTI() override
TESWaterForm * waterForm
Definition: TESObjectACTI.h:77
ActiFlags
Definition: TESObjectACTI.h:28
BGSSoundDescriptorForm * soundLoop
Definition: TESObjectACTI.h:75
bool GetIgnoredBySandbox() const override
void InitializeData() override
void SaveGame(BGSSaveFormBuffer *a_buf) override
bool IsWater() const override
TESWaterForm * GetWaterType() const override
std::uint16_t padC2
Definition: TESObjectACTI.h:79
static constexpr auto RTTI
Definition: TESObjectACTI.h:24
void LoadGame(BGSLoadFormBuffer *a_buf) override
std::uint32_t padC4
Definition: TESObjectACTI.h:80
stl::enumeration< ActiFlags, std::uint16_t > flags
Definition: TESObjectACTI.h:78
void InitItemImpl() override
bool CalculateDoFavor(Actor *a_activator, bool a_arg2, TESObjectREFR *a_toActivate, float a_arg3) override
static constexpr auto FORMTYPE
Definition: TESObjectACTI.h:25
bool Load(TESFile *a_mod) override
void ClearData() override
Definition: TESObjectREFR.h:105
Definition: TESWaterForm.h:83
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_TESObjectACTI
Definition: Offsets_RTTI.h:6027
Definition: TESObjectACTI.h:37
RecordFlag
Definition: TESObjectACTI.h:39
@ kNavMeshGeneration_Filter
Definition: TESObjectACTI.h:51
@ kObstacle
Definition: TESObjectACTI.h:50
@ kNavMeshGeneration_Ground
Definition: TESObjectACTI.h:54
@ kChildCanUse
Definition: TESObjectACTI.h:53
@ kHasTreeLOD
Definition: TESObjectACTI.h:41
@ kDeleted
Definition: TESObjectACTI.h:40
@ kDangerous
Definition: TESObjectACTI.h:47
@ kRandomAnimStart
Definition: TESObjectACTI.h:46
@ kHiddenFromLocalMap
Definition: TESObjectACTI.h:43
@ kIgnoresObjectInteraction
Definition: TESObjectACTI.h:48
@ kIsMarker
Definition: TESObjectACTI.h:49
@ kNavMeshGeneration_BoundingBox
Definition: TESObjectACTI.h:52
@ kHasDistantLOD
Definition: TESObjectACTI.h:45
@ kIgnored
Definition: TESObjectACTI.h:44
@ kMustUpdateAnims
Definition: TESObjectACTI.h:42