CommonLibSSE NG
Loading...
Searching...
No Matches
MagicTarget.h
Go to the documentation of this file.
1#pragma once
2
3#include "RE/B/BSContainer.h"
5#include "RE/B/BSTEvent.h"
6#include "RE/B/BSTList.h"
9#include "RE/M/MagicSystem.h"
10#include "RE/N/NiPoint3.h"
11
12namespace RE
13{
14 class Actor;
15 class ActiveEffect;
16 class BGSKeyword;
17 class EffectItem;
18 class EffectSetting;
19 class MagicItem;
20 class TESBoundObject;
21 class TESObjectREFR;
22
23 struct Effect;
24
26 {
27 public:
28 inline static constexpr auto RTTI = RTTI_MagicTarget;
29 inline static constexpr auto VTABLE = VTABLE_MagicTarget;
30
32
34 {
35 public:
36 inline static constexpr auto RTTI = RTTI_MagicTarget__ForEachActiveEffectVisitor;
38
39 virtual ~ForEachActiveEffectVisitor(){}; // 00
40
41 // add
42 virtual BSContainer::ForEachResult Accept(ActiveEffect* a_effect) = 0; // 01
43 };
44 static_assert(sizeof(ForEachActiveEffectVisitor) == 0x8);
45
47 {
50 std::uint32_t pad0C; // 0C
53 };
54 static_assert(sizeof(SpellDispelData) == 0x20);
55
57 {
60 Effect* effect; // 10
62 std::uint64_t unk20; // 20 - MagicCaster::PostCreationCallback
63 std::uint64_t unk28; // 28 - MagicTarget**
65 float magnitude; // 3C
66 float unk40; // 40
68 std::uint8_t unk48; // 48
69 bool dualCasted; // 49
70 std::uint16_t pad4A; // 4A
71 std::uint32_t pad4C; // 4C
72 };
73 static_assert(sizeof(AddTargetData) == 0x50);
74
75 virtual ~MagicTarget(); // 00
76
77 // add
78 virtual bool AddTarget(AddTargetData& a_targetData); // 01
79 virtual TESObjectREFR* GetTargetStatsObject(); // 02 - { return false; }
80 [[nodiscard]] virtual bool MagicTargetIsActor() const; // 03 - { return false; }
81 virtual bool IsInvulnerable(); // 04 - { return false; }
82 virtual void InvalidateCommandedActorEffect(ActiveEffect* a_effect); // 05 - { return; }
83 virtual bool CanAddActiveEffect() = 0; // 06
85 virtual void EffectAdded(ActiveEffect* a_effect); // 08 - { return; }
86 virtual void EffectRemoved(ActiveEffect* a_effect); // 09 - { return; }
87 virtual float CheckResistance(MagicItem* a_magicItem, Effect* a_effect, TESBoundObject* a_object); // 0A - { return 1.0; }
88 virtual bool CheckAbsorb(Actor* a_actor, MagicItem* a_magicItem, const Effect* a_effect); // 0B - { return false; }
89
90 bool DispelEffect(MagicItem* a_spell, BSPointerHandle<Actor>& a_caster, ActiveEffect* a_effect = nullptr);
91 void DispelEffectsWithArchetype(Archetype a_type, bool a_force);
94 bool HasMagicEffectWithKeyword(BGSKeyword* a_keyword, std::uint64_t a_arg2);
96
97 // members
99 std::uint8_t flags; // 10
100 std::uint8_t pad11; // 11
101 std::uint16_t pad12; // 12
102 std::uint32_t pad14; // 14
103 };
104 static_assert(sizeof(MagicTarget) == 0x18);
105}
Definition ActiveEffect.h:27
Definition Actor.h:131
Definition BGSKeyword.h:10
Definition BSPointerHandle.h:91
Definition BSTList.h:10
Definition BSTSmartPointer.h:36
Definition EffectSetting.h:24
Definition MagicItem.h:30
virtual ~ForEachActiveEffectVisitor()
Definition MagicTarget.h:39
virtual BSContainer::ForEachResult Accept(ActiveEffect *a_effect)=0
static constexpr auto VTABLE
Definition MagicTarget.h:37
static constexpr auto RTTI
Definition MagicTarget.h:36
Definition MagicTarget.h:26
SpellDispelData * postUpdateDispelList
Definition MagicTarget.h:98
virtual TESObjectREFR * GetTargetStatsObject()
virtual bool CanAddActiveEffect()=0
virtual float CheckResistance(MagicItem *a_magicItem, Effect *a_effect, TESBoundObject *a_object)
bool HasMagicEffect(EffectSetting *a_effect)
std::uint16_t pad12
Definition MagicTarget.h:101
virtual void InvalidateCommandedActorEffect(ActiveEffect *a_effect)
void VisitEffects(ForEachActiveEffectVisitor &visitor)
virtual ~MagicTarget()
virtual bool CheckAbsorb(Actor *a_actor, MagicItem *a_magicItem, const Effect *a_effect)
std::uint8_t pad11
Definition MagicTarget.h:100
bool DispelEffect(MagicItem *a_spell, BSPointerHandle< Actor > &a_caster, ActiveEffect *a_effect=nullptr)
virtual bool AddTarget(AddTargetData &a_targetData)
bool HasEffectWithArchetype(Archetype a_type)
virtual bool IsInvulnerable()
void DispelEffectsWithArchetype(Archetype a_type, bool a_force)
virtual BSSimpleList< ActiveEffect * > * GetActiveEffectList()=0
bool HasMagicEffectWithKeyword(BGSKeyword *a_keyword, std::uint64_t a_arg2)
virtual bool MagicTargetIsActor() const
std::uint32_t pad14
Definition MagicTarget.h:102
std::uint8_t flags
Definition MagicTarget.h:99
static constexpr auto VTABLE
Definition MagicTarget.h:29
virtual void EffectRemoved(ActiveEffect *a_effect)
virtual void EffectAdded(ActiveEffect *a_effect)
static constexpr auto RTTI
Definition MagicTarget.h:28
Definition NiPoint3.h:6
Definition TESBoundObject.h:24
Definition TESObjectREFR.h:112
ForEachResult
Definition BSContainer.h:6
CastingSource
Definition MagicSystem.h:23
Definition AbsorbEffect.h:6
constexpr REL::VariantID RTTI_MagicTarget(513884, 392304, 0x1ed8020)
constexpr std::array< REL::VariantID, 1 > VTABLE_MagicTarget
Definition Offsets_VTABLE.h:66
constexpr std::array< REL::VariantID, 1 > VTABLE_MagicTarget__ForEachActiveEffectVisitor
Definition Offsets_VTABLE.h:815
constexpr REL::VariantID RTTI_MagicTarget__ForEachActiveEffectVisitor(685330, 393107, 0x1ee3d58)
ArchetypeID
Definition EffectArchetypes.h:8
Definition Effect.h:11
Definition MagicTarget.h:57
MagicSystem::CastingSource castingSource
Definition MagicTarget.h:67
TESBoundObject * source
Definition MagicTarget.h:61
MagicItem * magicItem
Definition MagicTarget.h:59
std::uint16_t pad4A
Definition MagicTarget.h:70
float magnitude
Definition MagicTarget.h:65
Effect * effect
Definition MagicTarget.h:60
std::uint8_t unk48
Definition MagicTarget.h:68
TESObjectREFR * caster
Definition MagicTarget.h:58
bool dualCasted
Definition MagicTarget.h:69
std::uint64_t unk20
Definition MagicTarget.h:62
NiPoint3 explosionPoint
Definition MagicTarget.h:64
float unk40
Definition MagicTarget.h:66
std::uint64_t unk28
Definition MagicTarget.h:63
std::uint32_t pad4C
Definition MagicTarget.h:71
Definition MagicTarget.h:47
std::uint32_t pad0C
Definition MagicTarget.h:50
SpellDispelData * next
Definition MagicTarget.h:52
MagicItem * spell
Definition MagicTarget.h:48
BSPointerHandle< Actor > caster
Definition MagicTarget.h:49
BSTSmartPointer< ActiveEffect > activeEffect
Definition MagicTarget.h:51