CommonLibVR
TESCombatStyle.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  struct CombatStyleGeneralData // CSGD
9  {
10  float offensiveMult; // 00
11  float defensiveMult; // 04
12  float groupOffensiveMult; // 08
13  float meleeScoreMult; // 0C
14  float magicScoreMult; // 10
15  float rangedScoreMult; // 14
16  float shoutScoreMult; // 18
17  float unarmedScoreMult; // 1C
18  float staffScoreMult; // 20
19  float avoidThreatChance; // 24
20  };
21  static_assert(sizeof(CombatStyleGeneralData) == 0x28);
22 
23  struct CombatStyleMeleeData // CSME
24  {
28  float bashMult; // 0C
29  float bashRecoilMult; // 10
30  float bashAttackMult; // 14
31  float bashPowerAttackMult; // 18
32  float specialAttackMult; // 1C
33  };
34  static_assert(sizeof(CombatStyleMeleeData) == 0x20);
35 
37  {
38  float circleMult; // 00
39  float fallbackMult; // 04
40  float flankDistanceMult; // 08
41  float stalkTimeMult; // 0C
42  };
43  static_assert(sizeof(CombatStyleCloseRangeData) == 0x10);
44 
45  struct CombatStyleLongRangeData // CSLR
46  {
47  float strafeMult; // 0
48  };
49  static_assert(sizeof(CombatStyleLongRangeData) == 0x4);
50 
51  struct CombatStyleFlightData // CSFL
52  {
53  float hoverChance; // 00
54  float diveBombChance; // 04
55  float groundAttackChance; // 08
56  float hoverTimeMult; // 0C
57  float groundAttackTimeMult; // 10
58  float perchAttackChance; // 14
59  float perchAttackTimeMult; // 18
60  float flyingAttackChance; // 1C
61  };
62  static_assert(sizeof(CombatStyleFlightData) == 0x20);
63 
64  class TESCombatStyle : public TESForm
65  {
66  public:
67  inline static constexpr auto RTTI = RTTI_TESCombatStyle;
68  inline static constexpr auto VTABLE = VTABLE_TESCombatStyle;
69  inline static constexpr auto FORMTYPE = FormType::CombatStyle;
70 
71  enum class FLAG // DATA
72  {
73  kNone = 0,
74  kDuelingStyle = 1 << 0,
75  kFlankingStyle = 1 << 1,
76  kAllowDualWielding = 1 << 2
77  };
78 
79  struct RecordFlags
80  {
81  enum RecordFlag : std::uint32_t
82  {
83  kDeleted = 1 << 5,
84  kIgnored = 1 << 12,
85  kAllowDualWielding = 1 << 19
86  };
87  };
88 
89  ~TESCombatStyle() override; // 00
90 
91  // override (TESForm)
92  void InitializeData() override; // 04
93  bool Load(TESFile* a_mod) override; // 06
94  void InitItemImpl() override; // 13
95 
96  // members
103  private:
104  KEEP_FOR_RE()
105  };
106  static_assert(sizeof(TESCombatStyle) == 0xA0);
107 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
Definition: TESCombatStyle.h:65
bool Load(TESFile *a_mod) override
CombatStyleMeleeData meleeData
Definition: TESCombatStyle.h:98
void InitializeData() override
void InitItemImpl() override
static constexpr auto VTABLE
Definition: TESCombatStyle.h:68
static constexpr auto FORMTYPE
Definition: TESCombatStyle.h:69
CombatStyleCloseRangeData closeRangeData
Definition: TESCombatStyle.h:99
static constexpr auto RTTI
Definition: TESCombatStyle.h:67
CombatStyleGeneralData generalData
Definition: TESCombatStyle.h:97
CombatStyleFlightData flightData
Definition: TESCombatStyle.h:101
~TESCombatStyle() override
FLAG
Definition: TESCombatStyle.h:72
stl::enumeration< FLAG, std::uint32_t > flags
Definition: TESCombatStyle.h:102
CombatStyleLongRangeData longRangeData
Definition: TESCombatStyle.h:100
Definition: TESFile.h:17
Definition: TESForm.h:40
Definition: AbsorbEffect.h:6
constexpr std::array< REL::ID, 1 > VTABLE_TESCombatStyle
Definition: Offsets_VTABLE.h:12814
constexpr REL::ID RTTI_TESCombatStyle(static_cast< std::uint64_t >(513907))
Definition: TESCombatStyle.h:37
float circleMult
Definition: TESCombatStyle.h:38
float stalkTimeMult
Definition: TESCombatStyle.h:41
float flankDistanceMult
Definition: TESCombatStyle.h:40
float fallbackMult
Definition: TESCombatStyle.h:39
Definition: TESCombatStyle.h:52
float groundAttackTimeMult
Definition: TESCombatStyle.h:57
float perchAttackTimeMult
Definition: TESCombatStyle.h:59
float flyingAttackChance
Definition: TESCombatStyle.h:60
float diveBombChance
Definition: TESCombatStyle.h:54
float groundAttackChance
Definition: TESCombatStyle.h:55
float perchAttackChance
Definition: TESCombatStyle.h:58
float hoverTimeMult
Definition: TESCombatStyle.h:56
float hoverChance
Definition: TESCombatStyle.h:53
Definition: TESCombatStyle.h:9
float meleeScoreMult
Definition: TESCombatStyle.h:13
float avoidThreatChance
Definition: TESCombatStyle.h:19
float magicScoreMult
Definition: TESCombatStyle.h:14
float defensiveMult
Definition: TESCombatStyle.h:11
float shoutScoreMult
Definition: TESCombatStyle.h:16
float offensiveMult
Definition: TESCombatStyle.h:10
float rangedScoreMult
Definition: TESCombatStyle.h:15
float staffScoreMult
Definition: TESCombatStyle.h:18
float groupOffensiveMult
Definition: TESCombatStyle.h:12
float unarmedScoreMult
Definition: TESCombatStyle.h:17
Definition: TESCombatStyle.h:46
float strafeMult
Definition: TESCombatStyle.h:47
Definition: TESCombatStyle.h:24
float powerAttackBlockingMult
Definition: TESCombatStyle.h:27
float attackIncapacitatedMult
Definition: TESCombatStyle.h:25
float powerAttackIncapacitatedMult
Definition: TESCombatStyle.h:26
float bashRecoilMult
Definition: TESCombatStyle.h:29
float specialAttackMult
Definition: TESCombatStyle.h:32
float bashAttackMult
Definition: TESCombatStyle.h:30
float bashPowerAttackMult
Definition: TESCombatStyle.h:31
float bashMult
Definition: TESCombatStyle.h:28
Definition: TESCombatStyle.h:80
RecordFlag
Definition: TESCombatStyle.h:82
@ kDeleted
Definition: TESCombatStyle.h:83
@ kIgnored
Definition: TESCombatStyle.h:84
@ kAllowDualWielding
Definition: TESCombatStyle.h:85