CommonLibSSE (Parapets fork)
MagicCaster.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSPointerHandle.h"
4 #include "RE/B/BSSoundHandle.h"
5 #include "RE/M/MagicTarget.h"
6 
7 namespace RE
8 {
9  class BGSLoadFormBuffer;
10  class BGSSaveFormBuffer;
11  class MagicItem;
12 
14  {
15  public:
16  inline static constexpr auto RTTI = RTTI_MagicCaster;
17 
18  enum class State
19  {
20  kNone = 0
21  };
22 
24  {
25  public:
26  inline static constexpr auto RTTI = RTTI_MagicCaster__PostCreationCallback;
27 
28  ~PostCreationCallback() override; // 00
29 
30  // override (IPostCreationModification)
31  void ModifyActiveEffect(ActiveEffect* a_effect) override; // 01
32 
33  // members
34  std::uint64_t unk08[8];
35  };
36  static_assert(sizeof(PostCreationCallback) == 0x48);
37 
38  virtual ~MagicCaster(); // 00
39 
40  // add
41  virtual void CastSpellImmediate(MagicItem* a_spell, bool a_arg2, TESObjectREFR* a_target, float a_power, bool a_arg6, float a_magnitudeOverride = 0.0f, Actor* a_owner = nullptr); // 01
42  virtual void Unk_02(void); // 02
43  virtual void Unk_03(void); // 03
44  virtual void Unk_04(void); // 04
45  virtual void Unk_05(void); // 05
46  virtual void Unk_06(void); // 06
47  virtual void Unk_07(void); // 07 - { return; }
48  virtual void Unk_08(void); // 08 - { return; }
49  virtual void SpellCast(bool a_arg1, std::uint32_t a_arg2, MagicItem* a_arg3); // 09 - { return; }
50  virtual bool CheckCast(MagicItem* a_spell, bool a_arg2, float* a_arg3, MagicSystem::CannotCastReason* a_reasonOut, bool a_arg5); // 0A
51  virtual TESObjectREFR* GetCasterStatsObject() const; // 0B - { return 0; }
52  virtual Actor* GetCasterAsActor() const; // 0C - { return 0; }
53  virtual TESObjectREFR* GetCasterObjectReference(Actor** a_casterOut) const; // 0D
54  virtual NiNode* GetMagicNode(); // 0E - { return 0; }
55  virtual void ClearMagicNode(); // 0F - { return; }
56  virtual void SetCurrentSpellImpl(MagicItem* a_spell); // 10 - { return; }
57  virtual void Unk_11(void); // 11 - { return; }
58  virtual void Unk_12(void); // 12 - { return; }
59  virtual void SetSkipCheckCast(); // 13 - { return; }
60  virtual void SetCastingTimerForCharge(); // 14
61  virtual MagicSystem::CastingSource GetCastingSource() const; // 15 - { return 0; }
62  virtual bool GetIsDualCasting() const; // 16 - { return 0; }
63  virtual void SetDualCasting(bool a_value); // 17 - { return; }
64  virtual void SaveGame(BGSSaveFormBuffer* a_buffer); // 18
65  virtual void LoadGame(BGSLoadFormBuffer* a_buffer); // 19
66  virtual void Unk_1A(void); // 1A
67  virtual void Unk_1B(void); // 1B
68  virtual void AdjustActiveEffect(ActiveEffect* a_effect, float a_power, bool a_hostileOnly); // 1C
69 
70  // members
73  std::uint32_t pad24; // 24
76  float castingTimer; // 34
77  float currentSpellCost; // 38
78  float magnitudeOverride; // 3C
79  float nextTargetUpdate; // 40
80  float projectileTimer; // 44
81  };
82  static_assert(sizeof(MagicCaster) == 0x48);
83 }
Definition: ActiveEffect.h:22
Definition: Actor.h:134
Definition: BSTArray.h:377
Definition: MagicCaster.h:24
std::uint64_t unk08[8]
Definition: MagicCaster.h:34
void ModifyActiveEffect(ActiveEffect *a_effect) override
static constexpr auto RTTI
Definition: MagicCaster.h:26
Definition: MagicCaster.h:14
virtual bool GetIsDualCasting() const
virtual void LoadGame(BGSLoadFormBuffer *a_buffer)
MagicItem * currentSpell
Definition: MagicCaster.h:74
float currentSpellCost
Definition: MagicCaster.h:77
virtual void SaveGame(BGSSaveFormBuffer *a_buffer)
BSTArray< BSSoundHandle > sounds
Definition: MagicCaster.h:71
ObjectRefHandle desiredTarget
Definition: MagicCaster.h:72
virtual MagicSystem::CastingSource GetCastingSource() const
float magnitudeOverride
Definition: MagicCaster.h:78
virtual void Unk_12(void)
virtual NiNode * GetMagicNode()
virtual void Unk_04(void)
virtual void ClearMagicNode()
virtual ~MagicCaster()
virtual bool CheckCast(MagicItem *a_spell, bool a_arg2, float *a_arg3, MagicSystem::CannotCastReason *a_reasonOut, bool a_arg5)
virtual void Unk_1A(void)
virtual void CastSpellImmediate(MagicItem *a_spell, bool a_arg2, TESObjectREFR *a_target, float a_power, bool a_arg6, float a_magnitudeOverride=0.0f, Actor *a_owner=nullptr)
virtual void Unk_03(void)
virtual void Unk_1B(void)
virtual void SetDualCasting(bool a_value)
static constexpr auto RTTI
Definition: MagicCaster.h:16
virtual Actor * GetCasterAsActor() const
virtual void SetCurrentSpellImpl(MagicItem *a_spell)
virtual void Unk_02(void)
virtual void SetCastingTimerForCharge()
float projectileTimer
Definition: MagicCaster.h:80
virtual void SetSkipCheckCast()
virtual void Unk_06(void)
virtual void AdjustActiveEffect(ActiveEffect *a_effect, float a_power, bool a_hostileOnly)
virtual void Unk_05(void)
stl::enumeration< State, std::uint32_t > state
Definition: MagicCaster.h:75
std::uint32_t pad24
Definition: MagicCaster.h:73
virtual TESObjectREFR * GetCasterObjectReference(Actor **a_casterOut) const
float nextTargetUpdate
Definition: MagicCaster.h:79
State
Definition: MagicCaster.h:19
virtual void Unk_11(void)
virtual TESObjectREFR * GetCasterStatsObject() const
virtual void Unk_07(void)
virtual void Unk_08(void)
float castingTimer
Definition: MagicCaster.h:76
virtual void SpellCast(bool a_arg1, std::uint32_t a_arg2, MagicItem *a_arg3)
Definition: MagicItem.h:27
Definition: MagicTarget.h:41
Definition: NiNode.h:12
Definition: TESObjectREFR.h:105
CannotCastReason
Definition: MagicSystem.h:8
CastingSource
Definition: MagicSystem.h:21
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_MagicCaster__PostCreationCallback
Definition: Offsets_RTTI.h:5126
constexpr REL::ID RTTI_MagicCaster
Definition: Offsets_RTTI.h:5125