CommonLibSSE (powerof3)
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/BSTList.h"
8#include "RE/M/MagicSystem.h"
9#include "RE/N/NiPoint3.h"
10
11namespace RE
12{
13 class Actor;
14 class ActiveEffect;
15 class BGSKeyword;
16 class EffectItem;
17 class EffectSetting;
18 class MagicItem;
19 class TESBoundObject;
20 class TESObjectREFR;
21
22 struct Effect;
23
25 {
26 public:
27 inline static constexpr auto RTTI = RTTI_MagicTarget;
28 inline static constexpr auto VTABLE = VTABLE_MagicTarget;
29
31
33 {
34 public:
35 inline static constexpr auto RTTI = RTTI_MagicTarget__ForEachActiveEffectVisitor;
37
38 virtual ~ForEachActiveEffectVisitor(){}; // 00
39
40 // add
41 virtual BSContainer::ForEachResult Accept(ActiveEffect* a_effect) = 0; // 01
42 };
43 static_assert(sizeof(ForEachActiveEffectVisitor) == 0x8);
44
53 static_assert(sizeof(SpellDispelData) == 0x20);
54
56 {
59 Effect* effect; // 10
61 std::uint64_t unk20; // 20 - MagicCaster::PostCreationCallback
62 std::uint64_t unk28; // 28 - MagicTarget**
64 float magnitude; // 3C
65 float unk40; // 40
67 std::uint8_t unk48; // 48
68 bool dualCasted; // 49
69 std::uint16_t pad4A; // 4A
70 std::uint32_t pad4C; // 4C
71 };
72 static_assert(sizeof(AddTargetData) == 0x50);
73
74 virtual ~MagicTarget(); // 00
75
76 // add
77 virtual bool AddTarget(AddTargetData& a_targetData); // 01
78 virtual TESObjectREFR* GetTargetStatsObject(); // 02 - { return false; }
79 [[nodiscard]] virtual bool MagicTargetIsActor() const; // 03 - { return false; }
80 virtual bool IsInvulnerable(); // 04 - { return false; }
81 virtual void InvalidateCommandedActorEffect(ActiveEffect* a_effect); // 05 - { return; }
82 virtual bool CanAddActiveEffect() = 0; // 06
84 virtual void EffectAdded(ActiveEffect* a_effect); // 08 - { return; }
85 virtual void EffectRemoved(ActiveEffect* a_effect); // 09 - { return; }
86 virtual float CheckResistance(MagicItem* a_magicItem, Effect* a_effect, TESBoundObject* a_object); // 0A - { return 1.0; }
87 virtual bool CheckAbsorb(Actor* a_actor, MagicItem* a_magicItem, const Effect* a_effect); // 0B - { return false; }
88
89 bool DispelEffect(MagicItem* a_spell, BSPointerHandle<Actor>& a_caster, ActiveEffect* a_effect = nullptr);
90 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:133
Definition BGSKeyword.h:10
Definition BSPointerHandle.h:91
Definition BSTList.h:10
Definition BSTSmartPointer.h:37
Definition EffectSetting.h:24
Definition MagicItem.h:30
virtual ~ForEachActiveEffectVisitor()
Definition MagicTarget.h:38
virtual BSContainer::ForEachResult Accept(ActiveEffect *a_effect)=0
static constexpr auto VTABLE
Definition MagicTarget.h:36
static constexpr auto RTTI
Definition MagicTarget.h:35
Definition MagicTarget.h:25
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)
Actor * GetTargetAsActor()
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:28
virtual void EffectRemoved(ActiveEffect *a_effect)
virtual void EffectAdded(ActiveEffect *a_effect)
static constexpr auto RTTI
Definition MagicTarget.h:27
Definition NiPoint3.h:6
Definition TESBoundObject.h:24
Definition TESObjectREFR.h:114
ForEachResult
Definition BSContainer.h:6
CastingSource
Definition MagicSystem.h:27
Definition AbsorbEffect.h:6
constexpr std::array< REL::ID, 1 > VTABLE_MagicTarget__ForEachActiveEffectVisitor
Definition Offsets_VTABLE.h:11986
constexpr REL::ID RTTI_MagicTarget__ForEachActiveEffectVisitor(static_cast< std::uint64_t >(685330))
constexpr REL::ID RTTI_MagicTarget(static_cast< std::uint64_t >(513884))
constexpr std::array< REL::ID, 1 > VTABLE_MagicTarget
Definition Offsets_VTABLE.h:11984
ArchetypeID
Definition EffectArchetypes.h:8
Definition Effect.h:11
Definition MagicTarget.h:56
MagicSystem::CastingSource castingSource
Definition MagicTarget.h:66
TESBoundObject * source
Definition MagicTarget.h:60
MagicItem * magicItem
Definition MagicTarget.h:58
std::uint16_t pad4A
Definition MagicTarget.h:69
float magnitude
Definition MagicTarget.h:64
Effect * effect
Definition MagicTarget.h:59
std::uint8_t unk48
Definition MagicTarget.h:67
TESObjectREFR * caster
Definition MagicTarget.h:57
bool dualCasted
Definition MagicTarget.h:68
std::uint64_t unk20
Definition MagicTarget.h:61
NiPoint3 explosionPoint
Definition MagicTarget.h:63
float unk40
Definition MagicTarget.h:65
std::uint64_t unk28
Definition MagicTarget.h:62
std::uint32_t pad4C
Definition MagicTarget.h:70
Definition MagicTarget.h:46
std::uint32_t pad0C
Definition MagicTarget.h:49
SpellDispelData * next
Definition MagicTarget.h:51
MagicItem * spell
Definition MagicTarget.h:47
BSPointerHandle< Actor > caster
Definition MagicTarget.h:48
BSTSmartPointer< ActiveEffect > activeEffect
Definition MagicTarget.h:50