CommonLibSSE NG
Loading...
Searching...
No Matches
TESSoulGem.h
Go to the documentation of this file.
1#pragma once
2
3#include "RE/F/FormTypes.h"
4#include "RE/S/SoulLevels.h"
6
7namespace RE
8{
9 class TESSoulGem : public TESObjectMISC
10 {
11 public:
12 inline static constexpr auto RTTI = RTTI_TESSoulGem;
13 inline static constexpr auto VTABLE = VTABLE_TESSoulGem;
14 inline static constexpr auto FORMTYPE = FormType::SoulGem;
15
17 {
18 enum RecordFlag : std::uint32_t
19 {
20 kDeleted = 1 << 5,
21 kIgnored = 1 << 12,
22 kCanHoldNPCSoul = 1 << 17
23 };
24 };
25
26 ~TESSoulGem() override; // 00
27
28 // override (TESObjectMISC)
29 void InitializeData() override; // 04
30 void LoadImpl(TESFile* a_mod, std::uint32_t a_chunkID) override; // 54
31 void InitImpl() override; // 55
32
33 // override (BGSKeywordForm)
34 [[nodiscard]] BGSKeyword* GetDefaultKeyword() const override; // 05
35
36 [[nodiscard]] bool CanHoldNPCSoul() const noexcept { return (GetFormFlags() & RecordFlags::kCanHoldNPCSoul) != 0; }
37 [[nodiscard]] constexpr SOUL_LEVEL GetContainedSoul() const noexcept { return *currentSoul; }
38 [[nodiscard]] constexpr SOUL_LEVEL GetMaximumCapacity() const noexcept { return *soulCapacity; }
39
40 // members
41 TESSoulGem* linkedSoulGem; // 100 - NAM0
44 std::uint16_t unk10A; // 10A
45 std::uint32_t unk10C; // 10C
46 };
47 static_assert(sizeof(TESSoulGem) == 0x110);
48}
Definition BGSKeyword.h:10
Definition TESFile.h:15
std::uint32_t GetFormFlags() const noexcept
Definition TESForm.h:286
Definition TESObjectMISC.h:28
Definition TESSoulGem.h:10
void InitImpl() override
static constexpr auto VTABLE
Definition TESSoulGem.h:13
BGSKeyword * GetDefaultKeyword() const override
stl::enumeration< SOUL_LEVEL, std::uint8_t > soulCapacity
Definition TESSoulGem.h:43
bool CanHoldNPCSoul() const noexcept
Definition TESSoulGem.h:36
static constexpr auto RTTI
Definition TESSoulGem.h:12
void LoadImpl(TESFile *a_mod, std::uint32_t a_chunkID) override
TESSoulGem * linkedSoulGem
Definition TESSoulGem.h:41
void InitializeData() override
std::uint16_t unk10A
Definition TESSoulGem.h:44
~TESSoulGem() override
constexpr SOUL_LEVEL GetMaximumCapacity() const noexcept
Definition TESSoulGem.h:38
static constexpr auto FORMTYPE
Definition TESSoulGem.h:14
std::uint32_t unk10C
Definition TESSoulGem.h:45
constexpr SOUL_LEVEL GetContainedSoul() const noexcept
Definition TESSoulGem.h:37
stl::enumeration< SOUL_LEVEL, std::uint8_t > currentSoul
Definition TESSoulGem.h:42
Definition PCH.h:223
Definition AbsorbEffect.h:6
constexpr REL::VariantID RTTI_TESSoulGem(513979, 392853, 0x1edf678)
SOUL_LEVEL
Definition SoulLevels.h:6
constexpr std::array< REL::VariantID, 10 > VTABLE_TESSoulGem
Definition Offsets_VTABLE.h:560
Definition TESSoulGem.h:17
RecordFlag
Definition TESSoulGem.h:19
@ kCanHoldNPCSoul
Definition TESSoulGem.h:22
@ kIgnored
Definition TESSoulGem.h:21
@ kDeleted
Definition TESSoulGem.h:20