CommonLibVR
Loading...
Searching...
No Matches
TESSpellList.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace RE
7{
8 class SpellItem;
9 class TESLevSpell;
10 class TESShout;
11
13 {
14 public:
15 inline static constexpr auto RTTI = RTTI_TESSpellList;
16 inline static constexpr auto VTABLE = VTABLE_TESSpellList;
17
18 struct SpellData // SPLO
19 {
21 ~SpellData() = default;
22
23 bool AddLevSpell(TESLevSpell* a_levSpell);
24 bool AddLevSpells(const std::vector<TESLevSpell*>& a_levSpells);
25 bool AddShout(TESShout* a_shout);
26 bool AddShouts(const std::vector<TESShout*>& a_shouts);
27 bool AddSpell(SpellItem* a_spell);
28 bool AddSpells(const std::vector<SpellItem*>& a_spells);
29
30 std::optional<std::uint32_t> GetIndex(const SpellItem* a_spell) const;
31 std::optional<std::uint32_t> GetIndex(const TESLevSpell* a_levSpell) const;
32 std::optional<std::uint32_t> GetIndex(const TESShout* a_shout) const;
33
34 bool RemoveLevSpell(TESLevSpell* a_levSpell);
35 bool RemoveLevSpells(const std::vector<TESLevSpell*>& a_levSpells);
36 bool RemoveShout(TESShout* a_shout);
37 bool RemoveShouts(const std::vector<TESShout*>& a_shouts);
38 bool RemoveSpell(SpellItem* a_spell);
39 bool RemoveSpells(const std::vector<SpellItem*>& a_spells);
40
42
46 std::uint32_t numSpells; // 18
47 std::uint32_t numlevSpells; // 1C
48 std::uint32_t numShouts; // 20
49 std::uint32_t pad24; // 24
50
51 private:
52 void CopySpellList(const std::vector<TESLevSpell*>& a_copiedData);
53 void CopySpellList(const std::vector<TESShout*>& a_copiedData);
54 void CopySpellList(const std::vector<SpellItem*>& a_copiedData);
55 };
56 static_assert(sizeof(SpellData) == 0x28);
57
58 ~TESSpellList() override; // 00
59
60 // override (BaseFormComponent)
61 void InitializeDataComponent() override; // 01 - { return; }
62 void ClearDataComponent() override; // 02
63 void CopyComponent(BaseFormComponent* a_rhs) override; // 03
64
65 // members
66 SpellData* actorEffects; // 08 - SPLO
67 private:
69 };
70 static_assert(sizeof(TESSpellList) == 0x10);
71}
#define KEEP_FOR_RE()
Definition PCH.h:517
Definition BaseFormComponent.h:8
Definition SpellItem.h:16
Definition TESLevSpell.h:12
Definition TESShout.h:18
Definition TESSpellList.h:13
static constexpr auto VTABLE
Definition TESSpellList.h:16
SpellData * actorEffects
Definition TESSpellList.h:66
static constexpr auto RTTI
Definition TESSpellList.h:15
void InitializeDataComponent() override
~TESSpellList() override
void CopyComponent(BaseFormComponent *a_rhs) override
void ClearDataComponent() override
Definition AbsorbEffect.h:6
constexpr REL::ID RTTI_TESSpellList(static_cast< std::uint64_t >(513947))
constexpr std::array< REL::ID, 1 > VTABLE_TESSpellList
Definition Offsets_VTABLE.h:12903
Definition TESSpellList.h:19
bool RemoveShout(TESShout *a_shout)
std::optional< std::uint32_t > GetIndex(const TESShout *a_shout) const
SpellItem ** spells
Definition TESSpellList.h:43
bool AddLevSpells(const std::vector< TESLevSpell * > &a_levSpells)
bool RemoveLevSpell(TESLevSpell *a_levSpell)
bool RemoveSpell(SpellItem *a_spell)
std::optional< std::uint32_t > GetIndex(const TESLevSpell *a_levSpell) const
TESShout ** shouts
Definition TESSpellList.h:45
std::uint32_t numSpells
Definition TESSpellList.h:46
bool AddSpells(const std::vector< SpellItem * > &a_spells)
std::uint32_t pad24
Definition TESSpellList.h:49
std::optional< std::uint32_t > GetIndex(const SpellItem *a_spell) const
TESLevSpell ** levSpells
Definition TESSpellList.h:44
bool AddSpell(SpellItem *a_spell)
bool AddLevSpell(TESLevSpell *a_levSpell)
std::uint32_t numlevSpells
Definition TESSpellList.h:47
bool RemoveLevSpells(const std::vector< TESLevSpell * > &a_levSpells)
bool RemoveShouts(const std::vector< TESShout * > &a_shouts)
bool AddShout(TESShout *a_shout)
bool RemoveSpells(const std::vector< SpellItem * > &a_spells)
bool AddShouts(const std::vector< TESShout * > &a_shouts)
std::uint32_t numShouts
Definition TESSpellList.h:48