CommonLibSSE (Parapets fork)
MagicTarget.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSPointerHandle.h"
4 #include "RE/B/BSSimpleList.h"
5 #include "RE/B/BSTSmartPointer.h"
7 #include "RE/M/MagicSystem.h"
8 #include "RE/N/NiPoint3.h"
9 
10 namespace RE
11 {
12  class Actor;
13  class ActiveEffect;
14  class EffectItem;
15  class EffectSetting;
16  class MagicItem;
17  class TESBoundObject;
18  class TESObjectREFR;
19  struct Effect;
20 
22  {
23  public:
24  inline static constexpr auto RTTI = RTTI_MagicTarget;
25 
27 
29  {
30  public:
31  inline static constexpr auto RTTI = RTTI_MagicTarget__ForEachActiveEffectVisitor;
32 
33  virtual ~ForEachActiveEffectVisitor(); // 00
34 
35  // add
36  virtual bool Accept(ActiveEffect* a_effect) = 0; // 01
37  };
38  static_assert(sizeof(ForEachActiveEffectVisitor) == 0x8);
39 
41  {
42  public:
43  inline static constexpr auto RTTI = RTTI_MagicTarget__IPostCreationModification;
44 
45  virtual ~IPostCreationModification(); // 00
46 
47  // add
48  virtual void ModifyActiveEffect(ActiveEffect* a_effect) = 0; // 01
49  };
50  static_assert(sizeof(IPostCreationModification) == 0x8);
51 
53  {
54  public:
55  // members
57  Actor* caster; // 08
59  std::uint16_t unk18; // 18
60  std::uint16_t unk1A; // 1A
61  std::uint32_t pad1C; // 1C
62  };
63  static_assert(sizeof(ResultsCollector) == 0x20);
64 
66  {
67  Actor* caster; // 00
69  Effect* effect; // 10
74  float baseMagnitude; // 3C
75  float power; // 40
77  bool isProjectile; // 48
78  bool isDualCasting; // 49
79  std::uint16_t pad4A; // 4A
80  std::uint32_t pad4C; // 4C
81  };
82  static_assert(sizeof(AddTargetData) == 0x50);
83 
85  {
86  MagicItem* spell; // 00
88  std::uint32_t pad0C; // 0C
91  };
92  static_assert(sizeof(SpellDispelData) == 0x20);
93 
94  virtual ~MagicTarget(); // 00
95 
96  // add
97  virtual bool AddTarget(AddTargetData& a_data); // 01
98  virtual TESObjectREFR* GetTargetStatsObject(); // 02 - { return false; }
99  [[nodiscard]] virtual bool MagicTargetIsActor() const; // 03 - { return false; }
100  virtual bool IsInvulnerable(); // 04 - { return false; }
101  virtual void InvalidateCommandedActorEffect(ActiveEffect* a_effect); // 05 - { return; }
102  virtual bool CanAddActiveEffect() = 0; // 06
104  virtual void EffectAdded(ActiveEffect* a_effect); // 08 - { return; }
105  virtual void EffectRemoved(ActiveEffect* a_effect); // 09 - { return; }
106  virtual void CheckResistance(MagicItem* a_magicItem, EffectItem* a_effect, TESBoundObject* a_object); // 0A - { return 1.0; }
107  virtual void CheckAbsorb(Actor* a_actor, MagicItem* a_magicItem, const EffectItem* a_effect); // 0B - { return false; }
108 
109  void DispelEffectsWithArchetype(Archetype a_type, bool a_force);
111  bool HasMagicEffect(EffectSetting* a_effect);
112 
113  // members
115  std::uint8_t flags; // 10
116  std::uint8_t pad11; // 11
117  std::uint16_t pad12; // 12
118  std::uint32_t pad14; // 14
119  };
120  static_assert(sizeof(MagicTarget) == 0x18);
121 }
Definition: ActiveEffect.h:22
Definition: Actor.h:134
Definition: BSSimpleList.h:10
Definition: BSTSmartPointer.h:37
Definition: EffectSetting.h:24
Definition: MagicItem.h:27
virtual bool Accept(ActiveEffect *a_effect)=0
static constexpr auto RTTI
Definition: MagicTarget.h:31
Definition: MagicTarget.h:41
static constexpr auto RTTI
Definition: MagicTarget.h:43
virtual void ModifyActiveEffect(ActiveEffect *a_effect)=0
Definition: MagicTarget.h:53
std::uint16_t unk18
Definition: MagicTarget.h:59
TESObjectREFR * target
Definition: MagicTarget.h:56
std::uint32_t pad1C
Definition: MagicTarget.h:61
std::uint16_t unk1A
Definition: MagicTarget.h:60
Actor * caster
Definition: MagicTarget.h:57
MagicItem * magicItem
Definition: MagicTarget.h:58
Definition: MagicTarget.h:22
SpellDispelData * postUpdateDispelList
Definition: MagicTarget.h:114
virtual bool CanAddActiveEffect()=0
bool HasMagicEffect(EffectSetting *a_effect)
virtual bool AddTarget(AddTargetData &a_data)
std::uint16_t pad12
Definition: MagicTarget.h:117
virtual void CheckAbsorb(Actor *a_actor, MagicItem *a_magicItem, const EffectItem *a_effect)
virtual void InvalidateCommandedActorEffect(ActiveEffect *a_effect)
virtual BSSimpleList< ActiveEffect * > * GetActiveEffectList()=0
virtual TESObjectREFR * GetTargetStatsObject()
virtual ~MagicTarget()
std::uint8_t pad11
Definition: MagicTarget.h:116
virtual void CheckResistance(MagicItem *a_magicItem, EffectItem *a_effect, TESBoundObject *a_object)
bool HasEffectWithArchetype(Archetype a_type)
virtual bool IsInvulnerable()
void DispelEffectsWithArchetype(Archetype a_type, bool a_force)
virtual bool MagicTargetIsActor() const
std::uint32_t pad14
Definition: MagicTarget.h:118
std::uint8_t flags
Definition: MagicTarget.h:115
virtual void EffectRemoved(ActiveEffect *a_effect)
virtual void EffectAdded(ActiveEffect *a_effect)
static constexpr auto RTTI
Definition: MagicTarget.h:24
Definition: NiPoint3.h:6
Definition: TESBoundObject.h:24
Definition: TESObjectREFR.h:105
CastingSource
Definition: MagicSystem.h:21
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_MagicTarget__IPostCreationModification
Definition: Offsets_RTTI.h:5139
constexpr REL::ID RTTI_MagicTarget__ForEachActiveEffectVisitor
Definition: Offsets_RTTI.h:5138
constexpr REL::ID RTTI_MagicTarget
Definition: Offsets_RTTI.h:5136
ArchetypeID
Definition: EffectArchetypes.h:11
Definition: Effect.h:11
Definition: MagicTarget.h:66
MagicSystem::CastingSource castingSource
Definition: MagicTarget.h:76
NiPoint3 center
Definition: MagicTarget.h:73
MagicItem * magicItem
Definition: MagicTarget.h:68
std::uint16_t pad4A
Definition: MagicTarget.h:79
ResultsCollector * resultsCollector
Definition: MagicTarget.h:72
float power
Definition: MagicTarget.h:75
Effect * effect
Definition: MagicTarget.h:69
IPostCreationModification * postCreationCallback
Definition: MagicTarget.h:71
bool isProjectile
Definition: MagicTarget.h:77
float baseMagnitude
Definition: MagicTarget.h:74
TESBoundObject * object
Definition: MagicTarget.h:70
Actor * caster
Definition: MagicTarget.h:67
std::uint32_t pad4C
Definition: MagicTarget.h:80
bool isDualCasting
Definition: MagicTarget.h:78
Definition: MagicTarget.h:85
std::uint32_t pad0C
Definition: MagicTarget.h:88
SpellDispelData * next
Definition: MagicTarget.h:90
MagicItem * spell
Definition: MagicTarget.h:86
BSPointerHandle< Actor > caster
Definition: MagicTarget.h:87
BSTSmartPointer< ActiveEffect > activeEffect
Definition: MagicTarget.h:89