CommonLibVR
BGSBaseAlias.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSFixedString.h"
4 
5 namespace RE
6 {
7  class TESFile;
8  class TESForm;
9  class TESQuest;
10 
12  {
13  public:
14  inline static constexpr auto RTTI = RTTI_BGSBaseAlias;
15  inline static constexpr auto VTABLE = VTABLE_BGSBaseAlias;
16  inline static constexpr auto VMTYPEID = static_cast<VMTypeID>(139);
17 
18  enum class FLAGS
19  {
20  kNone = 0,
21  kReserves = 1 << 0,
22  kOptional = 1 << 1,
23  kQuestObject = 1 << 2,
24  kAllowReuse = 1 << 3,
25  kAllowDead = 1 << 4,
26  kLoadedOnly = 1 << 5,
27  kEssential = 1 << 6,
28  kAllowDisabled = 1 << 7,
29  kStoreName = 1 << 8,
30  kAllowReserved = 1 << 9,
31  kProtected = 1 << 10,
32  kForcedFromAlias = 1 << 11,
33  kAllowDestroyed = 1 << 12,
34  kFindPlayerClosest = 1 << 13,
35  kUsesNames = 1 << 14,
36  kInitiallyDisabled = 1 << 15,
37  kAllowCleared = 1 << 16,
38  kClearNameOnRemove = 1 << 17,
39  kActorsOnly = 1 << 18,
40  kTransient = 1 << 19,
41  kExternalLink = 1 << 20,
42  kNoPickpocket = 1 << 21,
43  kDataAlias = 1 << 22,
44  kSceneOptional = 1 << 24,
45  kCreateIn = 1 << 31 // BGSRefAlias
46  };
47 
48  enum class FILL_TYPE // BGSRefAlias
49  {
50  kConditions = 0,
51  kForced = 1,
52  kFromAlias = 2,
53  kFromEvent = 3,
54  kCreated = 4,
55  kFromExternal = 5,
56  kUniqueActor = 6,
57  kNearAlias = 7
58  };
59 
60  virtual ~BGSBaseAlias(); // 00
61 
62  // add
63  virtual bool Load(TESFile* a_mod) = 0; // 01
64  virtual void InitItem(TESForm* a_form) = 0; // 02
65  [[nodiscard]] virtual const BSFixedString& QType() const = 0; // 03
66 
67  [[nodiscard]] const BSFixedString& GetTypeString() const;
68  [[nodiscard]] VMTypeID GetVMTypeID() const;
69  [[nodiscard]] bool IsEssential() const;
70  [[nodiscard]] bool IsProtected() const;
71  [[nodiscard]] bool IsQuestObject() const;
72  void SetEssential(bool a_set);
73  void SetProtected(bool a_set);
74 
75  // members
76  BSFixedString aliasName; // 08 - ALID
78  std::uint32_t aliasID; // 18 - ALST/ALLS
81  std::uint16_t pad22; // 22
82  std::uint32_t pad24; // 24
83  private:
84  KEEP_FOR_RE()
85  };
86  static_assert(sizeof(BGSBaseAlias) == 0x28);
87 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
Definition: BGSBaseAlias.h:12
bool IsEssential() const
TESQuest * owningQuest
Definition: BGSBaseAlias.h:77
stl::enumeration< FILL_TYPE, std::uint16_t > fillType
Definition: BGSBaseAlias.h:80
FLAGS
Definition: BGSBaseAlias.h:19
static constexpr auto VMTYPEID
Definition: BGSBaseAlias.h:16
virtual bool Load(TESFile *a_mod)=0
void SetProtected(bool a_set)
virtual ~BGSBaseAlias()
std::uint32_t aliasID
Definition: BGSBaseAlias.h:78
virtual const BSFixedString & QType() const =0
const BSFixedString & GetTypeString() const
std::uint16_t pad22
Definition: BGSBaseAlias.h:81
void SetEssential(bool a_set)
stl::enumeration< FLAGS, std::uint32_t > flags
Definition: BGSBaseAlias.h:79
static constexpr auto VTABLE
Definition: BGSBaseAlias.h:15
BSFixedString aliasName
Definition: BGSBaseAlias.h:76
bool IsQuestObject() const
virtual void InitItem(TESForm *a_form)=0
static constexpr auto RTTI
Definition: BGSBaseAlias.h:14
std::uint32_t pad24
Definition: BGSBaseAlias.h:82
bool IsProtected() const
VMTypeID GetVMTypeID() const
FILL_TYPE
Definition: BGSBaseAlias.h:49
Definition: TESFile.h:17
Definition: TESForm.h:40
Definition: TESQuest.h:197
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_BGSBaseAlias(static_cast< std::uint64_t >(685384))
constexpr std::array< REL::ID, 1 > VTABLE_BGSBaseAlias
Definition: Offsets_VTABLE.h:8590
std::uint32_t VMTypeID
Definition: BSCoreTypes.h:9