CommonLibVR
TESIdleForm.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSFixedString.h"
4 #include "RE/B/BSString.h"
5 #include "RE/F/FormTypes.h"
6 #include "RE/T/TESCondition.h"
7 #include "RE/T/TESForm.h"
8 
9 namespace RE
10 {
11  class Actor;
12  class NiFormArray;
13  class TESObjectREFR;
14 
15  struct IDLE_DATA // DATA
16  {
17  public:
18  enum class Flag
19  {
20  kNone = 0,
21  kParent = 1 << 0,
22  kSequence = 1 << 1,
23  kNoAttacking = 1 << 2,
24  kBlocking = 1 << 3
25  };
26 
27  // members
28  std::int8_t loopMin; // 0
29  std::int8_t loopMax; // 1
31  std::uint8_t animationGroupSelection; // 3
32  std::uint16_t replayDelay; // 4
33  };
34  static_assert(sizeof(IDLE_DATA) == 0x6);
35 
36  class TESIdleForm : public TESForm
37  {
38  public:
39  inline static constexpr auto RTTI = RTTI_TESIdleForm;
40  inline static constexpr auto VTABLE = VTABLE_TESIdleForm;
41  inline static constexpr auto FORMTYPE = FormType::Idle;
42 
43  struct RecordFlags
44  {
45  enum RecordFlag : std::uint32_t
46  {
47  kDeleted = 1 << 5,
48  kIgnored = 1 << 12
49  };
50  };
51 
52  ~TESIdleForm() override; // 00
53 
54  // override (TESForm)
55  void InitializeData() override; // 04
56  void ClearData() override; // 05
57  bool Load(TESFile* a_mod) override; // 06
58  TESForm* CreateDuplicateForm(bool a_createEditorID, void* a_arg2) override; // 09
59  void InitItemImpl() override; // 13
60  const char* GetFormEditorID() const override; // 32 - { return formEditorID.c_str(); }
61  bool SetFormEditorID(const char* a_str) override; // 33
62 
63  bool CheckConditions(Actor* a_actor, TESObjectREFR* a_target, bool a_checkParentIdle)
64  {
65  using func_t = decltype(&TESIdleForm::CheckConditions);
66  static REL::Relocation<func_t> func{ RELOCATION_ID(24069, 24572) };
67  return func(this, a_actor, a_target, a_checkParentIdle);
68  }
69 
70  // members
72  IDLE_DATA data; // 28 - DATA
73  std::uint16_t pad2E; // 2E
75  TESIdleForm* parentIdle; // 38 - ANAM~
76  TESIdleForm* prevIdle; // 40 - ~ANAM
79  BSString formEditorID; // 58 - EDID
80  private:
81  KEEP_FOR_RE()
82  };
83  static_assert(sizeof(TESIdleForm) == 0x68);
84 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
#define RELOCATION_ID(SE, AE)
Definition: PCH.h:702
Definition: Relocation.h:210
Definition: Actor.h:133
Definition: NiTArray.h:282
Definition: TESCondition.h:992
Definition: TESFile.h:17
Definition: TESForm.h:40
Definition: TESIdleForm.h:37
BSFixedString animEventName
Definition: TESIdleForm.h:78
void InitItemImpl() override
~TESIdleForm() override
TESCondition conditions
Definition: TESIdleForm.h:71
static constexpr auto RTTI
Definition: TESIdleForm.h:39
std::uint16_t pad2E
Definition: TESIdleForm.h:73
static constexpr auto FORMTYPE
Definition: TESIdleForm.h:41
IDLE_DATA data
Definition: TESIdleForm.h:72
TESIdleForm * parentIdle
Definition: TESIdleForm.h:75
void ClearData() override
bool Load(TESFile *a_mod) override
bool SetFormEditorID(const char *a_str) override
TESIdleForm * prevIdle
Definition: TESIdleForm.h:76
const char * GetFormEditorID() const override
NiFormArray * childIdles
Definition: TESIdleForm.h:74
TESForm * CreateDuplicateForm(bool a_createEditorID, void *a_arg2) override
BSFixedString animFileName
Definition: TESIdleForm.h:77
BSString formEditorID
Definition: TESIdleForm.h:79
static constexpr auto VTABLE
Definition: TESIdleForm.h:40
bool CheckConditions(Actor *a_actor, TESObjectREFR *a_target, bool a_checkParentIdle)
Definition: TESIdleForm.h:63
void InitializeData() override
Definition: TESObjectREFR.h:113
Definition: AbsorbEffect.h:6
constexpr std::array< REL::ID, 1 > VTABLE_TESIdleForm
Definition: Offsets_VTABLE.h:12835
constexpr REL::ID RTTI_TESIdleForm(static_cast< std::uint64_t >(513932))
Definition: TESIdleForm.h:16
std::uint16_t replayDelay
Definition: TESIdleForm.h:32
stl::enumeration< Flag, std::uint8_t > flags
Definition: TESIdleForm.h:30
std::int8_t loopMax
Definition: TESIdleForm.h:29
Flag
Definition: TESIdleForm.h:19
std::uint8_t animationGroupSelection
Definition: TESIdleForm.h:31
std::int8_t loopMin
Definition: TESIdleForm.h:28
Definition: TESIdleForm.h:44
RecordFlag
Definition: TESIdleForm.h:46
@ kIgnored
Definition: TESIdleForm.h:48
@ kDeleted
Definition: TESIdleForm.h:47