CommonLibSSE NG
Loading...
Searching...
No Matches
ActorMagicCaster.h
Go to the documentation of this file.
1#pragma once
2
4#include "RE/B/BSTEvent.h"
5#include "RE/M/MagicCaster.h"
8
9namespace RE
10{
11 class BGSArtObject;
12 class BGSArtObjectCloneTask;
13 class BSLight;
14 class ReferenceEffectController;
15
16 struct BSAnimationGraphEvent;
17
19 public MagicCaster, // 00
21 public BSTEventSink<BSAnimationGraphEvent> // 60
22 {
23 public:
24 inline static constexpr auto RTTI = RTTI_ActorMagicCaster;
25
26 using InterruptHandler_t = void(Actor*);
27
28 enum class Flags
29 {
30 kNone = 0,
31 kDualCasting = 1 << 0,
32 kSkipCheckCast = 1 << 1,
33 kStartCloneTask = 1 << 2,
34 kCastingArtAttached = 1 << 3,
36 kDeferInterrupt = 1 << 5
37 };
38
39 ~ActorMagicCaster() override; // 00
40
41 // override (MagicCaster)
42 void RequestCastImpl() override; // 03
43 bool StartChargeImpl() override; // 04
44 void StartReadyImpl() override; // 05
45 void StartCastImpl() override; // 06
46 void FinishCastImpl() override; // 07 - { return; }
47 void InterruptCastImpl(bool a_depleteEnergy) override; // 08 - { return; }
48 void SpellCast(bool a_doCast, std::uint32_t a_arg2, MagicItem* a_spell) override; // 09 - { return; }
49 bool CheckCast(MagicItem* a_spell, bool a_dualCast, float* a_alchStrength, MagicSystem::CannotCastReason* a_reason, bool a_useBaseValueForCost) override; // 0A
50 TESObjectREFR* GetCasterStatsObject() const override; // 0B - { return actor; }
51 Actor* GetCasterAsActor() const override; // 0C - { return actor; }
52 NiNode* GetMagicNode() override; // 0E - { return magicNode; }
53 void ClearMagicNode() override; // 0F - { magicNode = 0; }
54 void SetCurrentSpellImpl(MagicItem* a_spell) override; // 10 - { return; }
55 void SelectSpellImpl() override; // 11 - { return; }
56 void DeselectSpellImpl() override; // 12 - { return; }
57 void SetSkipCheckCast() override; // 13 - { return; }
58 void SetCastingTimerForCharge() override; // 14
59 MagicSystem::CastingSource GetCastingSource() const override; // 15 - { return castingSource; }
60 bool GetIsDualCasting() const override; // 16 - { return flags & 1; }
61 void SetDualCasting(bool a_set) override; // 17
62 void SaveGame(BGSSaveGameBuffer* a_buf) override; // 18
63 void LoadGame(BGSLoadGameBuffer* a_buf) override; // 19
64 void FinishLoadGame(BGSLoadGameBuffer* a_buf) override; // 1A
65 void PrepareSound(MagicSystem::SoundID a_sound, MagicItem* a_spell) override; // 1B
66 void AdjustActiveEffect(ActiveEffect* a_activeEffect, float a_power, bool a_arg3) override; // 1C
67
68 // add
69 virtual void Update(float a_delta); // 1D
70
72 {
73 using func_t = decltype(&ActorMagicCaster::CheckAttachCastingArt);
74 REL::Relocation<func_t> func{ RELOCATION_ID(33403, 34185) };
75 return func(this);
76 }
77
78 // members
81 Actor* actor; // B8
88 float costCharged; // F0
91 };
92 static_assert(sizeof(ActorMagicCaster) == 0x100);
93}
#define RELOCATION_ID(a_se, a_ae)
Definition PCH.h:794
Definition ActiveEffect.h:27
Definition Actor.h:131
Definition ActorMagicCaster.h:22
void(Actor *) InterruptHandler_t
Definition ActorMagicCaster.h:26
static constexpr auto RTTI
Definition ActorMagicCaster.h:24
void InterruptCastImpl(bool a_depleteEnergy) override
void SpellCast(bool a_doCast, std::uint32_t a_arg2, MagicItem *a_spell) override
void SaveGame(BGSSaveGameBuffer *a_buf) override
void StartCastImpl() override
void RequestCastImpl() override
void LoadGame(BGSLoadGameBuffer *a_buf) override
ReferenceEffectController * weaponEnchantmentController
Definition ActorMagicCaster.h:87
bool GetIsDualCasting() const override
void FinishLoadGame(BGSLoadGameBuffer *a_buf) override
void PrepareSound(MagicSystem::SoundID a_sound, MagicItem *a_spell) override
stl::enumeration< Flags, std::uint32_t > flags
Definition ActorMagicCaster.h:90
void SetSkipCheckCast() override
NiNode * magicNode
Definition ActorMagicCaster.h:82
NiPointer< BGSArtObjectCloneTask > cloneTask
Definition ActorMagicCaster.h:80
BGSLoadGameSubBuffer loadGameSubBuffer
Definition ActorMagicCaster.h:85
NiNode * GetMagicNode() override
float costCharged
Definition ActorMagicCaster.h:88
bool StartChargeImpl() override
Flags
Definition ActorMagicCaster.h:29
void SetDualCasting(bool a_set) override
void StartReadyImpl() override
void AdjustActiveEffect(ActiveEffect *a_activeEffect, float a_power, bool a_arg3) override
BGSArtObject * castingArt
Definition ActorMagicCaster.h:86
NiPointer< BSLight > light
Definition ActorMagicCaster.h:83
MagicSystem::CastingSource castingSource
Definition ActorMagicCaster.h:89
void DeselectSpellImpl() override
void SetCurrentSpellImpl(MagicItem *a_spell) override
void ClearMagicNode() override
void SetCastingTimerForCharge() override
~ActorMagicCaster() override
bool CheckCast(MagicItem *a_spell, bool a_dualCast, float *a_alchStrength, MagicSystem::CannotCastReason *a_reason, bool a_useBaseValueForCost) override
RefAttachTechniqueInput castingArtData
Definition ActorMagicCaster.h:79
Actor * GetCasterAsActor() const override
void CheckAttachCastingArt()
Definition ActorMagicCaster.h:71
virtual void Update(float a_delta)
InterruptHandler_t * interruptHandler
Definition ActorMagicCaster.h:84
Actor * actor
Definition ActorMagicCaster.h:81
TESObjectREFR * GetCasterStatsObject() const override
void SelectSpellImpl() override
MagicSystem::CastingSource GetCastingSource() const override
void FinishCastImpl() override
Definition BGSArtObject.h:12
Definition BGSLoadGameBuffer.h:6
Definition BSTEvent.h:143
Definition MagicCaster.h:25
Definition MagicItem.h:30
Definition NiNode.h:12
Definition NiSmartPointer.h:9
Definition RefAttachTechniqueInput.h:12
Definition ReferenceEffectController.h:19
Definition SimpleAnimationGraphManagerHolder.h:11
Definition TESObjectREFR.h:112
Definition Relocation.h:1638
Definition PCH.h:223
SoundID
Definition MagicSystem.h:50
CannotCastReason
Definition MagicSystem.h:10
CastingSource
Definition MagicSystem.h:23
Definition AbsorbEffect.h:6
constexpr REL::VariantID RTTI_ActorMagicCaster(686479, 394312, 0x1efea30)
Definition BGSLoadGameSubBuffer.h:14