CommonLibSSE (powerof3)
TESSpellList.h
Go to the documentation of this file.
1 #pragma once
2 
4 #include "RE/M/MemoryManager.h"
5 
6 namespace 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 
43  SpellItem** spells; // 00
45  TESShout** shouts; // 10
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  };
68  static_assert(sizeof(TESSpellList) == 0x10);
69 }
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)
SpellItem ** spells
Definition: TESSpellList.h:43
bool AddLevSpells(const std::vector< TESLevSpell * > &a_levSpells)
bool RemoveLevSpell(TESLevSpell *a_levSpell)
bool RemoveSpell(SpellItem *a_spell)
TESShout ** shouts
Definition: TESSpellList.h:45
std::optional< std::uint32_t > GetIndex(const SpellItem *a_spell) const
std::uint32_t numSpells
Definition: TESSpellList.h:46
bool AddSpells(const std::vector< SpellItem * > &a_spells)
std::uint32_t pad24
Definition: TESSpellList.h:49
TESLevSpell ** levSpells
Definition: TESSpellList.h:44
std::optional< std::uint32_t > GetIndex(const TESLevSpell *a_levSpell) const
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)
std::optional< std::uint32_t > GetIndex(const TESShout *a_shout) const
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