CommonLibSSE (powerof3)
HitData.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSPointerHandle.h"
4 #include "RE/F/FormTypes.h"
5 #include "RE/N/NiPoint3.h"
6 #include "RE/N/NiSmartPointer.h"
7 
8 namespace RE
9 {
10  class BGSAttackData;
11  class InventoryEntryData;
12  class MagicItem;
13  class TESObjectWEAP;
14  class VATSCommand;
15 
16  class HitData
17  {
18  public:
19  enum class Flag
20  {
21  kBlocked = 1 << 0,
22  kBlockWithWeapon = 1 << 1,
23  kBlockCandidate = 1 << 2,
24  kCritical = 1 << 3,
25  kCriticalOnDeath = 1 << 4,
26  kFatal = 1 << 5,
27  kDismemberLimb = 1 << 6,
28  kExplodeLimb = 1 << 7,
29  kCrippleLimb = 1 << 8,
30  kDisarm = 1 << 9,
31  kDisableWeapon = 1 << 10,
32  kSneakAttack = 1 << 11,
33  kIgnoreCritical = 1 << 12,
34  kPredictDamage = 1 << 13,
35  //kPredictBaseDamage = 1 << 14,
36  kBash = 1 << 14,
37  kTimedBash = 1 << 15,
38  kPowerAttack = 1 << 16,
39  kMeleeAttack = 1 << 18,
40  kRicochet = 1 << 19,
41  kExplosion = 1 << 20
42  };
43 
44  void Populate(Actor* a_aggressor, Actor* a_target, InventoryEntryData* a_weapon)
45  {
46  using func_t = decltype(&HitData::Populate);
47  static REL::Relocation<func_t> func(RELOCATION_ID(42832, 44001));
48  return func(this, a_aggressor, a_target, a_weapon);
49  }
50 
51  // members
57  std::uint32_t pad24; // 24
63  float totalDamage; // 50
64  float physicalDamage; // 54
65  float targetedLimbDamage; // 58
66  float percentBlocked; // 5C
68  float resistedTypedDamage; // 64
69  float stagger; // 68
70  float sneakAttackBonus; // 6C
71  float bonusHealthDamageMult; // 70
72  float pushBack; // 74
73  float reflectedDamage; // 78
74  float criticalDamageMult; // 7C
76  std::uint32_t equipIndex; // 84
78  std::uint32_t damageLimb; // 8C
79  };
80  static_assert(sizeof(HitData) == 0x90);
81 }
#define RELOCATION_ID(SE, AE)
Definition: PCH.h:505
Definition: Relocation.h:210
Definition: Actor.h:133
Definition: HitData.h:17
float bonusHealthDamageMult
Definition: HitData.h:71
Flag
Definition: HitData.h:20
float percentBlocked
Definition: HitData.h:66
float criticalDamageMult
Definition: HitData.h:74
float pushBack
Definition: HitData.h:72
float resistedPhysicalDamage
Definition: HitData.h:67
VATSCommand * VATSCommand
Definition: HitData.h:62
SpellItem * attackDataSpell
Definition: HitData.h:61
float stagger
Definition: HitData.h:69
float reflectedDamage
Definition: HitData.h:73
std::uint32_t damageLimb
Definition: HitData.h:78
float resistedTypedDamage
Definition: HitData.h:68
ActorValue skill
Definition: HitData.h:77
ActorHandle aggressor
Definition: HitData.h:54
ObjectRefHandle sourceRef
Definition: HitData.h:56
REX::EnumSet< Flag, std::uint32_t > flags
Definition: HitData.h:75
MagicItem * criticalEffect
Definition: HitData.h:60
NiPoint3 hitPosition
Definition: HitData.h:52
void Populate(Actor *a_aggressor, Actor *a_target, InventoryEntryData *a_weapon)
Definition: HitData.h:44
std::uint32_t equipIndex
Definition: HitData.h:76
std::uint32_t pad24
Definition: HitData.h:57
float sneakAttackBonus
Definition: HitData.h:70
TESObjectWEAP * weapon
Definition: HitData.h:59
float targetedLimbDamage
Definition: HitData.h:65
NiPointer< BGSAttackData > attackData
Definition: HitData.h:58
NiPoint3 hitDirection
Definition: HitData.h:53
float totalDamage
Definition: HitData.h:63
ActorHandle target
Definition: HitData.h:55
float physicalDamage
Definition: HitData.h:64
Definition: InventoryEntryData.h:15
Definition: MagicItem.h:30
Definition: NiPoint3.h:6
Definition: NiSmartPointer.h:9
Definition: SpellItem.h:16
Definition: TESObjectWEAP.h:79
Definition: VATS.h:20
Definition: AbsorbEffect.h:6
ActorValue
Definition: ActorValues.h:6