112 return BSContainer::ForEachResult::kContinue;
115 std::uint32_t GetCount()
const {
return m_count; }
118 std::uint32_t m_count;
121 class GetNthEffect :
public MagicTarget::ForEachActiveEffectVisitor
124 GetNthEffect(std::uint32_t n) :
125 m_result(nullptr), m_n(n), m_count(0) {}
127 virtual BSContainer::ForEachResult Accept(ActiveEffect* effect)
override
129 if (m_count == m_n) {
131 return BSContainer::ForEachResult::kContinue;
134 return BSContainer::ForEachResult::kStop;
137 ActiveEffect* GetResult() {
return m_result; }
140 ActiveEffect* m_result;
142 std::uint32_t m_count;
145 class EffectVisitor :
public MagicTarget::ForEachActiveEffectVisitor
148 EffectVisitor(std::function<BSContainer::ForEachResult(ActiveEffect*)> func) :
151 virtual BSContainer::ForEachResult Accept(ActiveEffect* effect)
override
153 return m_functor(effect);
157 std::function<BSContainer::ForEachResult(ActiveEffect*)> m_functor;
162 EffectVisitor visitor(func);
163 ForEachActiveEffect(visitor);
166 void ForEachActiveEffect(MagicTarget::ForEachActiveEffectVisitor& visitor)
168 using func_t =
decltype(&MagicTarget::ForEachActiveEffect);
#define KEEP_FOR_RE()
Definition PCH.h:517
Definition Relocation.h:210
Definition ActiveEffect.h:27
Definition BGSKeyword.h:10
Definition BSPointerHandle.h:91
Definition BSTSmartPointer.h:37
Definition EffectSetting.h:24
Definition MagicItem.h:30
Definition MagicTarget.h:37
virtual ~ForEachActiveEffectVisitor()
Definition MagicTarget.h:42
virtual BSContainer::ForEachResult Accept(ActiveEffect *a_effect)=0
static constexpr auto VTABLE
Definition MagicTarget.h:40
static constexpr auto RTTI
Definition MagicTarget.h:39
Definition MagicTarget.h:29
SpellDispelData * postUpdateDispelList
Definition MagicTarget.h:175
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:178
virtual void InvalidateCommandedActorEffect(ActiveEffect *a_effect)
void VisitEffects(ForEachActiveEffectVisitor &visitor)
virtual bool CheckAbsorb(Actor *a_actor, MagicItem *a_magicItem, const Effect *a_effect)
std::uint8_t pad11
Definition MagicTarget.h:177
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:179
std::uint8_t flags
Definition MagicTarget.h:176
static constexpr auto VTABLE
Definition MagicTarget.h:32
virtual void EffectRemoved(ActiveEffect *a_effect)
virtual void EffectAdded(ActiveEffect *a_effect)
static constexpr auto RTTI
Definition MagicTarget.h:31
Definition TESBoundObject.h:26
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 MagicTarget.h:60
MagicSystem::CastingSource castingSource
Definition MagicTarget.h:70
TESBoundObject * source
Definition MagicTarget.h:64
MagicItem * magicItem
Definition MagicTarget.h:62
std::uint16_t pad4A
Definition MagicTarget.h:73
float magnitude
Definition MagicTarget.h:68
Effect * effect
Definition MagicTarget.h:63
std::uint8_t unk48
Definition MagicTarget.h:71
TESObjectREFR * caster
Definition MagicTarget.h:61
bool dualCasted
Definition MagicTarget.h:72
std::uint64_t unk20
Definition MagicTarget.h:65
NiPoint3 explosionPoint
Definition MagicTarget.h:67
float unk40
Definition MagicTarget.h:69
std::uint64_t unk28
Definition MagicTarget.h:66
std::uint32_t pad4C
Definition MagicTarget.h:74
Definition MagicTarget.h:50
std::uint32_t pad0C
Definition MagicTarget.h:53
SpellDispelData * next
Definition MagicTarget.h:55
MagicItem * spell
Definition MagicTarget.h:51
BSPointerHandle< Actor > caster
Definition MagicTarget.h:52
BSTSmartPointer< ActiveEffect > activeEffect
Definition MagicTarget.h:54