CommonLibSSE (Parapets fork)
TESFurniture.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/A/ActorValues.h"
4 #include "RE/B/BSTArray.h"
5 #include "RE/F/FormTypes.h"
6 #include "RE/T/TESObjectACTI.h"
7 
8 namespace RE
9 {
10  class TESFurniture : public TESObjectACTI
11  {
12  public:
13  inline static constexpr auto RTTI = RTTI_TESFurniture;
14  inline static constexpr auto FORMTYPE = FormType::Furniture;
15 
16  enum class ActiveMarker
17  {
18  kNone = 0,
19  kSit0 = 1 << 0,
20  kSit1 = 1 << 1,
21  kSit2 = 1 << 2,
22  kSit3 = 1 << 3,
23  kSit4 = 1 << 4,
24  kSit5 = 1 << 5,
25  kSit6 = 1 << 6,
26  kSit7 = 1 << 7,
27  kSit8 = 1 << 8,
28  kSit9 = 1 << 9,
29  kSit10 = 1 << 10,
30  kSit11 = 1 << 11,
31  kSit12 = 1 << 12,
32  kSit13 = 1 << 13,
33  kSit14 = 1 << 14,
34  kSit15 = 1 << 15,
35  kSit16 = 1 << 16,
36  kSit17 = 1 << 17,
37  kSit18 = 1 << 18,
38  kSit19 = 1 << 19,
39  kSit20 = 1 << 20,
40  kSit21 = 1 << 21,
41  kSit22 = 1 << 22,
42  kSit23 = 1 << 23,
43  kDisablesActivation = 1 << 25,
44  kIsPerch = 1 << 26,
45  kMustExitToTalk = 1 << 27
46  };
47 
48  struct RecordFlags
49  {
50  enum RecordFlag : std::uint32_t
51  {
52  kDeleted = 1 << 5,
53  kIsPerch = 1 << 7,
54  kIgnored = 1 << 12,
55  kHasDistantLOD = 1 << 15,
56  kRandomAnimStart = 1 << 16,
57  kIsMarker = 1 << 23,
58  kMustExitToTalk = 1 << 28,
59  kChildCanUse = 1 << 29
60  };
61  };
62 
63  struct WorkBenchData // WBDT
64  {
65  public:
66  enum class BenchType
67  {
68  kNone = 0,
69  kCreateObject = 1,
70  kSmithingWeapon = 2,
71  kEnchanting = 3,
73  kAlchemy = 5,
75  kSmithingArmor = 7,
76  };
77 
78  // members
81  };
82  static_assert(sizeof(WorkBenchData) == 0x2);
83 
85  {
86  public:
87  struct DisabledEntryPoint // NAM0
88  {
89  public:
90  enum class DisabledPoint
91  {
92  kNone = 0,
93  kFront = 1 << 0,
94  kBehind = 1 << 1,
95  kRight = 1 << 2,
96  kLeft = 1 << 3,
97  kUp = 1 << 4
98  };
99 
100  // members
101  std::uint16_t unk0; // 0
103  };
104  static_assert(sizeof(DisabledEntryPoint) == 0x4);
105 
106  // members
107  std::uint32_t entryPoint; // 00 - ENAM
109  BGSKeyword* keyword; // 08 - FNMK
110  };
111  static_assert(sizeof(EntryPointData) == 0x10);
112 
113  ~TESFurniture() override; // 00
114 
115  // override (TESObjectACTI)
116  void InitializeData() override; // 04
117  void ClearData() override; // 05
118  bool Load(TESFile* a_mod) override; // 06
119  void InitItemImpl() override; // 13
120  bool Activate(TESObjectREFR* a_targetRef, TESObjectREFR* a_activatorRef, std::uint8_t a_arg3, TESBoundObject* a_object, std::int32_t a_targetCount) override; // 37
121  NiAVObject* Clone3D(TESObjectREFR* a_ref) override; // 4A
122  bool GetActivateText(TESObjectREFR* a_activator, BSString& a_dst) override; // 4C
123  bool CalculateDoFavor(Actor* a_activator, bool a_arg2, TESObjectREFR* a_toActivate, float a_arg3) override; // 4D
124 
125  // members
128  std::uint16_t padE2; // E2
131  };
132  static_assert(sizeof(TESFurniture) == 0xF0);
133 }
Definition: Actor.h:134
Definition: BGSKeyword.h:10
Definition: BSTArray.h:377
Definition: NiAVObject.h:45
Definition: SpellItem.h:16
Definition: TESBoundObject.h:24
Definition: TESFile.h:14
Definition: TESFurniture.h:11
BSTArray< EntryPointData > entryPointDataArray
Definition: TESFurniture.h:126
~TESFurniture() override
SpellItem * associatedForm
Definition: TESFurniture.h:130
static constexpr auto FORMTYPE
Definition: TESFurniture.h:14
bool Load(TESFile *a_mod) override
void ClearData() override
ActiveMarker
Definition: TESFurniture.h:17
void InitItemImpl() override
WorkBenchData workBenchData
Definition: TESFurniture.h:127
static constexpr auto RTTI
Definition: TESFurniture.h:13
void InitializeData() override
stl::enumeration< ActiveMarker, std::uint32_t > furnFlags
Definition: TESFurniture.h:129
bool CalculateDoFavor(Actor *a_activator, bool a_arg2, TESObjectREFR *a_toActivate, float a_arg3) override
bool Activate(TESObjectREFR *a_targetRef, TESObjectREFR *a_activatorRef, std::uint8_t a_arg3, TESBoundObject *a_object, std::int32_t a_targetCount) override
bool GetActivateText(TESObjectREFR *a_activator, BSString &a_dst) override
std::uint16_t padE2
Definition: TESFurniture.h:128
NiAVObject * Clone3D(TESObjectREFR *a_ref) override
Definition: TESObjectACTI.h:22
Definition: TESObjectREFR.h:105
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_TESFurniture
Definition: Offsets_RTTI.h:5998
std::uint16_t unk0
Definition: TESFurniture.h:101
stl::enumeration< DisabledPoint, std::uint16_t > disabledPoints
Definition: TESFurniture.h:102
Definition: TESFurniture.h:85
std::uint32_t entryPoint
Definition: TESFurniture.h:104
DisabledEntryPoint disabledEntryPoints
Definition: TESFurniture.h:108
BGSKeyword * keyword
Definition: TESFurniture.h:109
Definition: TESFurniture.h:49
RecordFlag
Definition: TESFurniture.h:51
@ kMustExitToTalk
Definition: TESFurniture.h:58
@ kRandomAnimStart
Definition: TESFurniture.h:56
@ kDeleted
Definition: TESFurniture.h:52
@ kHasDistantLOD
Definition: TESFurniture.h:55
@ kIsPerch
Definition: TESFurniture.h:53
@ kIsMarker
Definition: TESFurniture.h:57
@ kChildCanUse
Definition: TESFurniture.h:59
@ kIgnored
Definition: TESFurniture.h:54
Definition: TESFurniture.h:64
BenchType
Definition: TESFurniture.h:67
stl::enumeration< ActorValue, std::uint8_t > usesSkill
Definition: TESFurniture.h:80
stl::enumeration< BenchType, std::uint8_t > benchType
Definition: TESFurniture.h:79