CommonLibSSE (Parapets fork)
Loading...
Searching...
No Matches
ExtraLock.h
Go to the documentation of this file.
1#pragma once
2
3#include "RE/B/BSExtraData.h"
5#include "RE/F/FormTypes.h"
6
7namespace RE
8{
9 enum class LOCK_LEVEL
10 {
11 kUnlocked = static_cast<std::underlying_type_t<LOCK_LEVEL>>(-1),
12 kVeryEasy = 0,
13 kEasy = 1,
14 kAverage = 2,
15 kHard = 3,
16 kVeryHard = 4,
17 kRequiresKey = 5
18 };
19
20 struct REFR_LOCK
21 {
22 enum class Flag
23 {
24 kNone = 0,
25 kLocked = 1 << 0,
26 kLeveled = 1 << 2
27 };
28
29 LOCK_LEVEL GetLockLevel(const TESObjectREFR* a_containerRef) const;
30 [[nodiscard]] constexpr bool IsLocked() const noexcept { return flags.all(Flag::kLocked); }
31 void SetLocked(bool a_locked);
32
33 // members
34 std::int8_t baseLevel; // 00
35 std::uint8_t pad01; // 01
36 std::uint16_t pad02; // 02
37 std::uint32_t pad04; // 04
38 TESKey* key; // 08
40 std::uint8_t pad11; // 11
41 std::uint16_t pad12; // 12
42 std::uint32_t numTries; // 14
43 std::uint32_t unk18; // 18
44 std::uint32_t pad1C; // 1C
45 };
46 static_assert(sizeof(REFR_LOCK) == 0x20);
47
48 class ExtraLock : public BSExtraData
49 {
50 public:
51 inline static constexpr auto RTTI = RTTI_ExtraLock;
52 inline static constexpr auto EXTRADATATYPE = ExtraDataType::kLock;
53
54 ~ExtraLock() override; // 00
55
56 // override (BSExtraData)
57 ExtraDataType GetType() const override; // 01 - { return kLock; }
58 bool IsNotEqual(const BSExtraData* a_rhs) const override; // 02
59
60 // members
62 };
63 static_assert(sizeof(ExtraLock) == 0x18);
64}
Definition: BSExtraData.h:9
Definition: ExtraLock.h:49
static constexpr auto RTTI
Definition: ExtraLock.h:51
bool IsNotEqual(const BSExtraData *a_rhs) const override
~ExtraLock() override
ExtraDataType GetType() const override
REFR_LOCK * lock
Definition: ExtraLock.h:61
static constexpr auto EXTRADATATYPE
Definition: ExtraLock.h:52
Definition: TESKey.h:9
Definition: TESObjectREFR.h:105
Definition: PCH.h:216
constexpr bool all(Args... a_args) const noexcept
Definition: PCH.h:288
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_ExtraLock
Definition: Offsets_RTTI.h:4708
LOCK_LEVEL
Definition: ExtraLock.h:10
ExtraDataType
Definition: ExtraDataTypes.h:173
Definition: ExtraLock.h:21
std::uint32_t numTries
Definition: ExtraLock.h:42
std::uint8_t pad11
Definition: ExtraLock.h:40
std::uint32_t pad1C
Definition: ExtraLock.h:44
TESKey * key
Definition: ExtraLock.h:38
std::uint32_t pad04
Definition: ExtraLock.h:37
void SetLocked(bool a_locked)
std::uint16_t pad02
Definition: ExtraLock.h:36
stl::enumeration< Flag, std::uint8_t > flags
Definition: ExtraLock.h:39
std::uint8_t pad01
Definition: ExtraLock.h:35
std::uint16_t pad12
Definition: ExtraLock.h:41
std::int8_t baseLevel
Definition: ExtraLock.h:34
constexpr bool IsLocked() const noexcept
Definition: ExtraLock.h:30
std::uint32_t unk18
Definition: ExtraLock.h:43
Flag
Definition: ExtraLock.h:23
LOCK_LEVEL GetLockLevel(const TESObjectREFR *a_containerRef) const