CommonLibSSE (Parapets fork)
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 VMTYPEID = static_cast<VMTypeID>(139);
16 
17  enum class FLAGS
18  {
19  kNone = 0,
20  kReserves = 1 << 0,
21  kOptional = 1 << 1,
22  kQuestObject = 1 << 2,
23  kAllowReuse = 1 << 3,
24  kAllowDead = 1 << 4,
25  kLoadedOnly = 1 << 5,
26  kEssential = 1 << 6,
27  kAllowDisabled = 1 << 7,
28  kStoreName = 1 << 8,
29  kAllowReserved = 1 << 9,
30  kProtected = 1 << 10,
31  kForcedFromAlias = 1 << 11,
32  kAllowDestroyed = 1 << 12,
33  kFindPlayerClosest = 1 << 13,
34  kUsesNames = 1 << 14,
35  kInitiallyDisabled = 1 << 15,
36  kAllowCleared = 1 << 16,
37  kClearNameOnRemove = 1 << 17,
38  kActorsOnly = 1 << 18,
39  kTransient = 1 << 19,
40  kExternalLink = 1 << 20,
41  kNoPickpocket = 1 << 21,
42  kDataAlias = 1 << 22,
43  kSceneOptional = 1 << 24,
44  kCreateIn = 1 << 31 // BGSRefAlias
45  };
46 
47  enum class FILL_TYPE // BGSRefAlias
48  {
49  kConditions = 0,
50  kForced = 1,
51  kFromAlias = 2,
52  kFromEvent = 3,
53  kCreated = 4,
54  kFromExternal = 5,
55  kUniqueActor = 6,
56  kNearAlias = 7
57  };
58 
59  virtual ~BGSBaseAlias(); // 00
60 
61  // add
62  virtual bool Load(TESFile* a_mod) = 0; // 01
63  virtual void InitItem(TESForm* a_form) = 0; // 02
64  [[nodiscard]] virtual const BSFixedString& QType() const = 0; // 03
65 
66  [[nodiscard]] const BSFixedString& GetTypeString() const;
67  [[nodiscard]] VMTypeID GetVMTypeID() const;
68  [[nodiscard]] bool IsQuestObject() const;
69 
70  // members
71  BSFixedString aliasName; // 08 - ALID
73  std::uint32_t aliasID; // 18 - ALST/ALLS
76  std::uint16_t pad22; // 22
77  std::uint32_t pad24; // 24
78  };
79  static_assert(sizeof(BGSBaseAlias) == 0x28);
80 }
Definition: BGSBaseAlias.h:12
TESQuest * owningQuest
Definition: BGSBaseAlias.h:72
stl::enumeration< FILL_TYPE, std::uint16_t > fillType
Definition: BGSBaseAlias.h:75
FLAGS
Definition: BGSBaseAlias.h:18
static constexpr auto VMTYPEID
Definition: BGSBaseAlias.h:15
virtual bool Load(TESFile *a_mod)=0
virtual ~BGSBaseAlias()
std::uint32_t aliasID
Definition: BGSBaseAlias.h:73
virtual const BSFixedString & QType() const =0
const BSFixedString & GetTypeString() const
std::uint16_t pad22
Definition: BGSBaseAlias.h:76
stl::enumeration< FLAGS, std::uint32_t > flags
Definition: BGSBaseAlias.h:74
BSFixedString aliasName
Definition: BGSBaseAlias.h:71
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:77
VMTypeID GetVMTypeID() const
FILL_TYPE
Definition: BGSBaseAlias.h:48
Definition: TESFile.h:14
Definition: TESForm.h:34
Definition: TESQuest.h:189
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_BGSBaseAlias
Definition: Offsets_RTTI.h:1264
std::uint32_t VMTypeID
Definition: BSCoreTypes.h:9