CommonLibSSE (Parapets fork)
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
25
26 struct Header // PRKE
27 {
28 public:
29 // members
30 std::uint8_t rank; // 0
31 std::uint8_t priority; // 1
32 std::uint16_t unk2; // 2
33 std::uint32_t unk4; // 4
34 };
35 static_assert(sizeof(Header) == 0x8);
36
37 virtual bool CheckConditionFilters(std::uint32_t a_numArgs, void* a_args); // 00 - { return false; }
38 virtual EntryPoint GetFunction(); // 01 - { return 0; }
39 [[nodiscard]] virtual void* GetFunctionData() const; // 02 - { return 0; }
40
41 virtual ~BGSPerkEntry(); // 03
42
43 [[nodiscard]] virtual PERK_ENTRY_TYPE GetType() const = 0; // 04
44 virtual void ClearData(); // 05 - { return; }
45 virtual void InitItem(TESFile* a_owner); // 06 - { return; }
46 virtual bool Load(TESFile* a_file); // 07 - { return true; }
47 virtual void SetParent(BGSPerk* a_parent); // 08 - { return; }
48 [[nodiscard]] virtual std::uint16_t GetID() const; // 09 - { return 0xFFFF; }
49 virtual void ApplyPerkEntry(Actor* a_actor) = 0; // 0A
50 virtual void RemovePerkEntry(Actor* a_actor) = 0; // 0B
51
52 [[nodiscard]] std::uint8_t GetRank() const;
53 [[nodiscard]] std::uint8_t GetPriority() const;
54
55 // members
56 Header header; // 08 - PRKE
57 };
58 static_assert(sizeof(BGSPerkEntry) == 0x10);
59}
Definition: Actor.h:125
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 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:56
virtual void SetParent(BGSPerk *a_parent)
Definition: BGSPerk.h:31
Definition: TESFile.h:14
Definition: AbsorbEffect.h:6
PERK_ENTRY_TYPE
Definition: BGSPerkEntry.h:13
constexpr REL::ID RTTI_BGSPerkEntry
Definition: Offsets_RTTI.h:1390
ENTRY_POINT
Definition: BGSEntryPoint.h:10
ENTRY_POINTS::ENTRY_POINT ENTRY_POINT
Definition: BGSEntryPoint.h:107
Definition: BGSPerkEntry.h:27
std::uint32_t unk4
Definition: BGSPerkEntry.h:33
std::uint8_t priority
Definition: BGSPerkEntry.h:31
std::uint16_t unk2
Definition: BGSPerkEntry.h:32
std::uint8_t rank
Definition: BGSPerkEntry.h:30