CommonLibSSE (powerof3)
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 
6 namespace 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  inline static constexpr auto VTABLE = VTABLE_CombatInventoryItem;
37 
38  enum class TYPE
39  {
40  kNone = 0,
41  kMelee,
42  kRanged,
43  kShield,
45  kMagic,
46  kShout,
47  kStaff,
48  kPotion,
49  kScroll,
50  kTorch
51  };
52 
53  enum class CATEGORY
54  {
55  kTotal = 7
56  };
57 
58  ~CombatInventoryItem() override; // 00
59 
60  // override (CombatObject)
61  void SaveGame(BGSSaveGameBuffer* a_buf) override; // 03
62  void LoadGame(BGSLoadGameBuffer* a_buf) override; // 04
63 
64  // add
65  virtual float GetMinRange(); // 05 - { return 0.0; }
66  virtual float GetMaxRange(); // 06 - { return 0.0; }
67  virtual float GetOptimalRange(); // 07 - { return 0.0; }
68  virtual float GetEquipRange(); // 08 - { return FLT_MAX; }
69  virtual TYPE GetType(); // 09
70  virtual TYPE GetEquipType(BGSEquipSlot a_slot); // 0A - { return GetType(); }
71  virtual CATEGORY GetCategory() = 0; // 0B
72  virtual float CalculateScore(CombatController* a_controller) = 0; // 0C
73  virtual CombatInventoryItem* Clone() = 0; // 0D
74  virtual bool CheckBusy(CombatController* a_controller); // 0E
75  virtual bool CheckShouldEquip(CombatController* a_controller); // 0F - { return !a_controller->state->isFleeing; }
76  virtual bool GetResource(CombatInventoryItemResource& a_resource); // 10
77  virtual void Equip(CombatController* a_controller); // 11
78  virtual void Unequip(CombatController* a_controller); // 12
79  virtual bool IsValid(); // 13 - { return item != nullptr; }
80  virtual void GetDescription(const char* a_dest, std::uint32_t a_size); // 14
81 
82  // members
83  TESForm* item; // 10
84  float itemScore; // 18
85  std::uint32_t unk1C; // 1C
87  };
88  static_assert(sizeof(CombatInventoryItem) == 0x30);
89 }
Definition: BGSEquipSlot.h:10
Definition: BGSLoadGameBuffer.h:6
Definition: BGSSaveGameBuffer.h:10
Definition: CombatController.h:23
Definition: CombatInventoryItem.h:24
BGSEquipSlot * equipSlot
Definition: CombatInventoryItem.h:27
std::uint32_t slot
Definition: CombatInventoryItem.h:28
Definition: CombatInventoryItem.h:33
virtual CombatInventoryItem * Clone()=0
virtual float GetMinRange()
virtual bool IsValid()
virtual bool CheckShouldEquip(CombatController *a_controller)
void SaveGame(BGSSaveGameBuffer *a_buf) override
virtual void Equip(CombatController *a_controller)
static constexpr auto VTABLE
Definition: CombatInventoryItem.h:36
virtual float GetEquipRange()
std::uint32_t unk1C
Definition: CombatInventoryItem.h:85
CombatInventoryItemSlot itemSlot
Definition: CombatInventoryItem.h:86
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:84
virtual bool GetResource(CombatInventoryItemResource &a_resource)
virtual TYPE GetType()
CATEGORY
Definition: CombatInventoryItem.h:54
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:83
TYPE
Definition: CombatInventoryItem.h:39
virtual float GetOptimalRange()
~CombatInventoryItem() override
Definition: CombatObject.h:11
Definition: TESForm.h:36
Definition: AbsorbEffect.h:6
ActorValue
Definition: ActorValues.h:6
constexpr std::array< REL::ID, 1 > VTABLE_CombatInventoryItem
Definition: Offsets_VTABLE.h:10961
constexpr REL::ID RTTI_CombatInventoryItem(static_cast< std::uint64_t >(687590))
Definition: CombatInventoryItem.h:15
float value
Definition: CombatInventoryItem.h:19
ActorValue actorValue
Definition: CombatInventoryItem.h:18