CommonLibVR
TESObjectCONT.h
Go to the documentation of this file.
1 #pragma once
2 
5 #include "RE/F/FormTypes.h"
7 #include "RE/T/TESContainer.h"
8 #include "RE/T/TESFullName.h"
12 #include "RE/T/TESWeightForm.h"
13 
14 namespace RE
15 {
16  struct CONT_DATA
17  {
18  enum class Flag
19  {
20  kNone = 0,
22  kRespawn = 1 << 1,
23  kShowOwner = 1 << 2
24  };
25 
27  };
28  static_assert(sizeof(CONT_DATA) == 0x1);
29 
30  class TESObjectCONT :
31  public TESBoundAnimObject, // 00
32  public TESContainer, // 30
33  public TESFullName, // 48
34  public TESModelTextureSwap, // 58
35  public TESWeightForm, // 90
36  public TESMagicCasterForm, // B8
37  public TESMagicTargetForm, // B9
38  public BGSDestructibleObjectForm, // A0
39  public BGSOpenCloseForm // B0
40  {
41  public:
42  inline static constexpr auto RTTI = RTTI_TESObjectCONT;
43  inline static constexpr auto FORMTYPE = FormType::Container;
44  inline static constexpr auto VTABLE = VTABLE_TESObjectCONT;
45 
46  struct RecordFlags
47  {
48  enum RecordFlag : std::uint32_t
49  {
50  kDeleted = 1 << 5,
51  kIgnored = 1 << 12,
52  kHasDistantLOD = 1 << 15,
53  kRandomAnimStart = 1 << 16,
54  kObstacle = 1 << 25,
58  };
59  };
60 
61  ~TESObjectCONT() override; // 00
62 
63  // override (TESBoundAnimObject)
64  void InitializeData() override; // 04
65  bool Load(TESFile* a_mod) override; // 06
66  void InitItemImpl() override; // 13
67  bool Activate(TESObjectREFR* a_targetRef, TESObjectREFR* a_activatorRef, std::uint8_t a_arg3, TESBoundObject* a_object, std::int32_t a_targetCount) override; // 37
68  bool GetActivateText(TESObjectREFR* a_activator, BSString& a_dst) override; // 4C
69  bool CalculateDoFavor(Actor* a_activator, bool a_arg2, TESObjectREFR* a_toActivate, float a_arg3) override; // 4D
70 
71  // override (BGSOpenCloseForm)
72  void HandleOpen(TESObjectREFR* a_target, TESObjectREFR* a_activator) override; // 01
73  void HandleClose(TESObjectREFR* a_target, TESObjectREFR* a_activator) override; // 02
74 
75  // members
76  CONT_DATA data; // B9 - DATA
77  std::uint16_t padBA; // BA
78  std::uint32_t padBC; // BC
81  private:
82  KEEP_FOR_RE()
83  };
84 #ifndef SKYRIMVR
85  static_assert(offsetof(TESObjectCONT, data) == 0xB9);
86  static_assert(sizeof(TESObjectCONT) == 0xD0);
87 #endif
88 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
Definition: Actor.h:133
Definition: BGSDestructibleObjectForm.h:61
Definition: BGSOpenCloseForm.h:9
Definition: BGSSoundDescriptorForm.h:14
Definition: TESBoundAnimObject.h:8
Definition: TESBoundObject.h:26
Definition: TESContainer.h:33
Definition: TESFile.h:17
Definition: TESFullName.h:9
Definition: TESMagicCasterForm.h:6
Definition: TESMagicTargetForm.h:6
Definition: TESModelTextureSwap.h:10
Definition: TESObjectCONT.h:40
bool CalculateDoFavor(Actor *a_activator, bool a_arg2, TESObjectREFR *a_toActivate, float a_arg3) override
BGSSoundDescriptorForm * openSound
Definition: TESObjectCONT.h:79
CONT_DATA data
Definition: TESObjectCONT.h:76
void HandleOpen(TESObjectREFR *a_target, TESObjectREFR *a_activator) override
bool GetActivateText(TESObjectREFR *a_activator, BSString &a_dst) override
void InitializeData() override
std::uint16_t padBA
Definition: TESObjectCONT.h:77
BGSSoundDescriptorForm * closeSound
Definition: TESObjectCONT.h:80
std::uint32_t padBC
Definition: TESObjectCONT.h:78
bool Activate(TESObjectREFR *a_targetRef, TESObjectREFR *a_activatorRef, std::uint8_t a_arg3, TESBoundObject *a_object, std::int32_t a_targetCount) override
~TESObjectCONT() override
static constexpr auto FORMTYPE
Definition: TESObjectCONT.h:43
static constexpr auto VTABLE
Definition: TESObjectCONT.h:44
void HandleClose(TESObjectREFR *a_target, TESObjectREFR *a_activator) override
static constexpr auto RTTI
Definition: TESObjectCONT.h:42
bool Load(TESFile *a_mod) override
void InitItemImpl() override
Definition: TESObjectREFR.h:113
Definition: TESWeightForm.h:8
Definition: AbsorbEffect.h:6
constexpr std::array< REL::ID, 7 > VTABLE_TESObjectCONT
Definition: Offsets_VTABLE.h:12863
constexpr REL::ID RTTI_TESObjectCONT(static_cast< std::uint64_t >(685079))
Definition: TESObjectCONT.h:17
Flag
Definition: TESObjectCONT.h:19
stl::enumeration< Flag, std::uint8_t > flags
Definition: TESObjectCONT.h:26
Definition: TESObjectCONT.h:47
RecordFlag
Definition: TESObjectCONT.h:49
@ kRandomAnimStart
Definition: TESObjectCONT.h:53
@ kHasDistantLOD
Definition: TESObjectCONT.h:52
@ kDeleted
Definition: TESObjectCONT.h:50
@ kObstacle
Definition: TESObjectCONT.h:54
@ kNavMeshGeneration_Ground
Definition: TESObjectCONT.h:57
@ kNavMeshGeneration_Filter
Definition: TESObjectCONT.h:55
@ kNavMeshGeneration_BoundingBox
Definition: TESObjectCONT.h:56
@ kIgnored
Definition: TESObjectCONT.h:51