CommonLibSSE NG
Loading...
Searching...
No Matches
CombatInventoryItem.h
Go to the documentation of this file.
1#pragma once
2
3#include "RE/A/ActorValues.h"
4#include "RE/C/CombatObject.h"
5
6namespace RE
7{
8 class BGSLoadGameBuffer;
9 class BGSSaveGameBuffer;
10 class CombatController;
11 class TESBoundObject;
12 class BGSEquipSlot;
13
15 {
16 public:
17 // members
19 float value; // 04
20 };
21 static_assert(sizeof(CombatInventoryItemResource) == 0x8);
22
24 {
25 public:
26 // members
28 std::uint32_t slot; // 0C
29 };
30 static_assert(sizeof(CombatInventoryItemSlot) == 0x10);
31
33 {
34 public:
35 inline static constexpr auto RTTI = RTTI_CombatInventoryItem;
36
37 enum class TYPE
38 {
39 kNone = 0,
40 kMelee,
41 kRanged,
42 kShield,
44 kMagic,
45 kShout,
46 kStaff,
47 kPotion,
48 kScroll,
49 kTorch
50 };
51
52 enum class CATEGORY
53 {
54 kTotal = 7
55 };
56
57 ~CombatInventoryItem() override; // 00
58
59 // override (CombatObject)
60 void SaveGame(BGSSaveGameBuffer* a_buf) override; // 03
61 void LoadGame(BGSLoadGameBuffer* a_buf) override; // 04
62
63 // add
64 virtual float GetMinRange(); // 05 - { return 0.0; }
65 virtual float GetMaxRange(); // 06 - { return 0.0; }
66 virtual float GetOptimalRange(); // 07 - { return 0.0; }
67 virtual float GetEquipRange(); // 08 - { return FLT_MAX; }
68 virtual TYPE GetType(); // 09
69 virtual TYPE GetEquipType(BGSEquipSlot a_slot); // 0A - { return GetType(); }
70 virtual CATEGORY GetCategory() = 0; // 0B
71 virtual float CalculateScore(CombatController* a_controller) = 0; // 0C
72 virtual CombatInventoryItem* Clone() = 0; // 0D
73 virtual bool CheckBusy(CombatController* a_controller); // 0E
74 virtual bool CheckShouldEquip(CombatController* a_controller); // 0F - { return !a_controller->state->isFleeing; }
75 virtual bool GetResource(CombatInventoryItemResource& a_resource); // 10
76 virtual void Equip(CombatController* a_controller); // 11
77 virtual void Unequip(CombatController* a_controller); // 12
78 virtual bool IsValid(); // 13 - { return item != nullptr; }
79 virtual void GetDescription(const char* a_dest, std::uint32_t a_size); // 14
80
81 // members
82 TESForm* item; // 10
83 float itemScore; // 18
84 std::uint32_t unk1C; // 1C
86 };
87 static_assert(sizeof(CombatInventoryItem) == 0x30);
88}
Definition BGSEquipSlot.h:10
Definition BGSLoadGameBuffer.h:6
Definition CombatController.h:23
Definition CombatInventoryItem.h:33
virtual float GetMinRange()
virtual bool IsValid()
virtual bool CheckShouldEquip(CombatController *a_controller)
void SaveGame(BGSSaveGameBuffer *a_buf) override
virtual void Equip(CombatController *a_controller)
virtual float GetEquipRange()
std::uint32_t unk1C
Definition CombatInventoryItem.h:84
CombatInventoryItemSlot itemSlot
Definition CombatInventoryItem.h:85
static constexpr auto RTTI
Definition CombatInventoryItem.h:35
virtual float GetMaxRange()
virtual void GetDescription(const char *a_dest, std::uint32_t a_size)
float itemScore
Definition CombatInventoryItem.h:83
virtual bool GetResource(CombatInventoryItemResource &a_resource)
virtual TYPE GetType()
CATEGORY
Definition CombatInventoryItem.h:53
virtual CombatInventoryItem * Clone()=0
virtual CATEGORY GetCategory()=0
virtual TYPE GetEquipType(BGSEquipSlot a_slot)
virtual void Unequip(CombatController *a_controller)
virtual float CalculateScore(CombatController *a_controller)=0
virtual bool CheckBusy(CombatController *a_controller)
void LoadGame(BGSLoadGameBuffer *a_buf) override
TESForm * item
Definition CombatInventoryItem.h:82
TYPE
Definition CombatInventoryItem.h:38
virtual float GetOptimalRange()
~CombatInventoryItem() override
Definition CombatInventoryItem.h:24
BGSEquipSlot * equipSlot
Definition CombatInventoryItem.h:27
std::uint32_t slot
Definition CombatInventoryItem.h:28
Definition CombatObject.h:11
Definition TESForm.h:35
Definition AbsorbEffect.h:6
constexpr REL::VariantID RTTI_CombatInventoryItem(687590, 395440, 0x1f1d1a8)
ActorValue
Definition ActorValues.h:6
Definition CombatInventoryItem.h:15
float value
Definition CombatInventoryItem.h:19
ActorValue actorValue
Definition CombatInventoryItem.h:18