CommonLibVR
Loading...
Searching...
No Matches
BGSPerkEntry.h
Go to the documentation of this file.
1#pragma once
2
4#include "RE/F/FormTypes.h"
5
6namespace RE
7{
8 class Actor;
9 class BGSEntryPointFunctionData;
10 class TESFile;
11
12 enum class PERK_ENTRY_TYPE
13 {
14 kQuest = 0,
15 kAbility = 1,
16 kEntryPoint = 2
17 };
18
20 {
21 public:
22 inline static constexpr auto RTTI = RTTI_BGSPerkEntry;
23 inline static constexpr auto VTABLE = VTABLE_BGSPerkEntry;
24
26
27 struct Header // PRKE
28 {
29 public:
30 // members
31 std::uint8_t rank; // 0
32 std::uint8_t priority; // 1
33 std::uint16_t unk2; // 2
34 std::uint32_t unk4; // 4
35 };
36 static_assert(sizeof(Header) == 0x8);
37
38 virtual bool CheckConditionFilters(std::uint32_t a_numArgs, void* a_args); // 00 - { return false; }
39 virtual EntryPoint GetFunction(); // 01 - { return 0; }
40 [[nodiscard]] virtual void* GetFunctionData() const; // 02 - { return 0; }
41
42 virtual ~BGSPerkEntry(); // 03
43
44 [[nodiscard]] virtual PERK_ENTRY_TYPE GetType() const = 0; // 04
45 virtual void ClearData(); // 05 - { return; }
46 virtual void InitItem(TESFile* a_owner); // 06 - { return; }
47 virtual bool Load(TESFile* a_file); // 07 - { return true; }
48 virtual void SetParent(BGSPerk* a_parent); // 08 - { return; }
49 [[nodiscard]] virtual std::uint16_t GetID() const; // 09 - { return 0xFFFF; }
50 virtual void ApplyPerkEntry(Actor* a_actor) = 0; // 0A
51 virtual void RemovePerkEntry(Actor* a_actor) = 0; // 0B
52
53 [[nodiscard]] std::uint8_t GetRank() const;
54 [[nodiscard]] std::uint8_t GetPriority() const;
55
56 // members
57 Header header; // 08 - PRKE
58 private:
60 };
61 static_assert(sizeof(BGSPerkEntry) == 0x10);
62}
#define KEEP_FOR_RE()
Definition PCH.h:517
Definition Actor.h:133
Definition BGSPerkEntry.h:20
virtual void ApplyPerkEntry(Actor *a_actor)=0
virtual ~BGSPerkEntry()
virtual bool CheckConditionFilters(std::uint32_t a_numArgs, void *a_args)
virtual EntryPoint GetFunction()
virtual void InitItem(TESFile *a_owner)
virtual bool Load(TESFile *a_file)
virtual void RemovePerkEntry(Actor *a_actor)=0
virtual PERK_ENTRY_TYPE GetType() const =0
virtual void ClearData()
static constexpr auto VTABLE
Definition BGSPerkEntry.h:23
static constexpr auto RTTI
Definition BGSPerkEntry.h:22
std::uint8_t GetRank() const
std::uint8_t GetPriority() const
virtual void * GetFunctionData() const
virtual std::uint16_t GetID() const
Header header
Definition BGSPerkEntry.h:57
virtual void SetParent(BGSPerk *a_parent)
Definition BGSPerk.h:33
Definition TESFile.h:17
Definition AbsorbEffect.h:6
PERK_ENTRY_TYPE
Definition BGSPerkEntry.h:13
constexpr std::array< REL::ID, 1 > VTABLE_BGSPerkEntry
Definition Offsets_VTABLE.h:8712
constexpr REL::ID RTTI_BGSPerkEntry(static_cast< std::uint64_t >(685390))
ENTRY_POINT
Definition BGSEntryPoint.h:14
ENTRY_POINTS::ENTRY_POINT ENTRY_POINT
Definition BGSEntryPoint.h:111
Definition BGSPerkEntry.h:28
std::uint32_t unk4
Definition BGSPerkEntry.h:34
std::uint8_t priority
Definition BGSPerkEntry.h:32
std::uint16_t unk2
Definition BGSPerkEntry.h:33
std::uint8_t rank
Definition BGSPerkEntry.h:31