CommonLibSSE (powerof3)
BGSRelationship.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/F/FormTypes.h"
4 #include "RE/T/TESForm.h"
5 
6 namespace RE
7 {
8  class BGSRelationship : public TESForm
9  {
10  public:
11  inline static constexpr auto RTTI = RTTI_BGSRelationship;
12  inline static constexpr auto FORMTYPE = FormType::Relationship;
13 
14  enum class RELATIONSHIP_LEVEL
15  {
16  kLover = 0,
17  kAlly = 1,
18  kConfidant = 2,
19  kFriend = 3,
20  kAcquaintance = 4,
21  kRival = 5,
22  kFoe = 6,
23  kEnemy = 7,
24  kArchnemesis = 8
25  };
26 
27  enum class Flag
28  {
29  kNone = 0,
30  kSecret = 1 << 7
31  };
32 
33  struct ChangeFlags
34  {
35  enum ChangeFlag : std::uint32_t
36  {
37  kRelationshipData = 1 << 1
38  };
39  };
40 
41  struct RecordFlags
42  {
43  enum RecordFlag : std::uint32_t
44  {
45  kDeleted = 1 << 5,
46  kSecret = 1 << 6,
47  kIgnored = 1 << 12
48  };
49  };
50 
51  ~BGSRelationship() override; // 00
52 
53  // override (TESForm)
54  void InitializeData() override; // 04
55  bool Load(TESFile* a_mod) override; // 06
56  void SaveGame(BGSSaveFormBuffer* a_buf) override; // 0E
57  void LoadGame(BGSLoadFormBuffer* a_buf) override; // 0F
58  void InitLoadGame(BGSLoadFormBuffer* a_buf) override; // 10
59  void InitItemImpl() override; // 13
60 
61  // members
62  TESNPC* npc1; // 20 - DATA~
63  TESNPC* npc2; // 28
66  std::uint8_t unk39; // 39
67  std::uint8_t unk3A; // 3A
69  std::uint32_t pad3C; // 3C - ~DATA
70  };
71  static_assert(sizeof(BGSRelationship) == 0x40);
72 }
Definition: BGSAssociationType.h:10
Definition: BGSRelationship.h:9
std::uint8_t unk3A
Definition: BGSRelationship.h:67
stl::enumeration< RELATIONSHIP_LEVEL, std::uint8_t > level
Definition: BGSRelationship.h:65
BGSAssociationType * assocType
Definition: BGSRelationship.h:64
~BGSRelationship() override
static constexpr auto FORMTYPE
Definition: BGSRelationship.h:12
std::uint8_t unk39
Definition: BGSRelationship.h:66
void InitItemImpl() override
std::uint32_t pad3C
Definition: BGSRelationship.h:69
stl::enumeration< Flag, std::uint8_t > flags
Definition: BGSRelationship.h:68
bool Load(TESFile *a_mod) override
TESNPC * npc2
Definition: BGSRelationship.h:63
void InitializeData() override
Flag
Definition: BGSRelationship.h:28
void InitLoadGame(BGSLoadFormBuffer *a_buf) override
void LoadGame(BGSLoadFormBuffer *a_buf) override
void SaveGame(BGSSaveFormBuffer *a_buf) override
RELATIONSHIP_LEVEL
Definition: BGSRelationship.h:15
static constexpr auto RTTI
Definition: BGSRelationship.h:11
TESNPC * npc1
Definition: BGSRelationship.h:62
Definition: TESFile.h:14
Definition: TESForm.h:34
Definition: TESNPC.h:36
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_BGSRelationship
Definition: Offsets_RTTI.h:1523
Definition: BGSRelationship.h:34
ChangeFlag
Definition: BGSRelationship.h:36
@ kRelationshipData
Definition: BGSRelationship.h:37
Definition: BGSRelationship.h:42
RecordFlag
Definition: BGSRelationship.h:44
@ kSecret
Definition: BGSRelationship.h:46
@ kIgnored
Definition: BGSRelationship.h:47
@ kDeleted
Definition: BGSRelationship.h:45