CommonLibSSE (powerof3)
BGSIdleCollection.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 namespace RE
6 {
7  class TESIdleForm;
8 
10  {
11  public:
12  inline static constexpr auto RTTI = RTTI_BGSIdleCollection;
13  inline static constexpr auto VTABLE = VTABLE_BGSIdleCollection;
14 
15  enum class IdleFlags
16  {
17  kNone = 0,
18  kPickSequence = 1 << 0,
19  kOldPickConditions = 1 << 1,
20  kDoOnce = 1 << 2,
21  kLooseOnly = 1 << 3,
22  kNoSandbox = 1 << 4
23  };
24 
25  ~BGSIdleCollection() override; // 00
26 
27  // override (BaseFormComponent)
28  void InitializeDataComponent() override; // 01
29  void ClearDataComponent() override; // 02
30  void CopyComponent(BaseFormComponent* a_rhs) override; // 03
31 
32  bool AddIdle(TESIdleForm* a_idle);
34  std::optional<std::uint32_t> GetIndex(TESIdleForm* a_idle) const;
35  bool RemoveIdle(TESIdleForm* a_idle);
36 
37  // members
39  std::int8_t idleCount; // 09 - IDLC
40  std::uint16_t pad0A; // 0A
41  std::uint32_t pad0C; // 0C
42  TESIdleForm** idles; // 10 - IDLA
43  float timerCheckForIdle; // 18 - IDLT
44  std::uint32_t pad1C; // 1C
45 
46  private:
47  BGSIdleCollection* Ctor()
48  {
49  using func_t = decltype(&BGSIdleCollection::Ctor);
50  static REL::Relocation<func_t> func{ RELOCATION_ID(14127, 14227) };
51  return func(this);
52  }
53  void CopyIdles(const std::vector<TESIdleForm*>& a_copiedData);
54  };
55  static_assert(sizeof(BGSIdleCollection) == 0x20);
56 }
#define RELOCATION_ID(SE, AE)
Definition: PCH.h:505
Definition: Relocation.h:210
Definition: BGSIdleCollection.h:10
static constexpr auto VTABLE
Definition: BGSIdleCollection.h:13
static BGSIdleCollection * Create()
~BGSIdleCollection() override
std::optional< std::uint32_t > GetIndex(TESIdleForm *a_idle) const
bool RemoveIdle(TESIdleForm *a_idle)
void CopyComponent(BaseFormComponent *a_rhs) override
bool AddIdle(TESIdleForm *a_idle)
void ClearDataComponent() override
std::int8_t idleCount
Definition: BGSIdleCollection.h:39
TESIdleForm ** idles
Definition: BGSIdleCollection.h:42
static constexpr auto RTTI
Definition: BGSIdleCollection.h:12
std::uint32_t pad0C
Definition: BGSIdleCollection.h:41
float timerCheckForIdle
Definition: BGSIdleCollection.h:43
void InitializeDataComponent() override
REX::EnumSet< IdleFlags, std::int8_t > idleFlags
Definition: BGSIdleCollection.h:38
std::uint32_t pad1C
Definition: BGSIdleCollection.h:44
std::uint16_t pad0A
Definition: BGSIdleCollection.h:40
IdleFlags
Definition: BGSIdleCollection.h:16
Definition: BaseFormComponent.h:8
Definition: TESIdleForm.h:37
Definition: AbsorbEffect.h:6
constexpr std::array< REL::ID, 1 > VTABLE_BGSIdleCollection
Definition: Offsets_VTABLE.h:8631
constexpr REL::ID RTTI_BGSIdleCollection(static_cast< std::uint64_t >(513931))