CommonLibSSE NG
BGSOutfit.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSTArray.h"
4 #include "RE/B/BSTEvent.h"
5 #include "RE/F/FormTypes.h"
6 #include "RE/T/TESForm.h"
7 
8 namespace RE
9 {
10  class BGSOutfit : public TESForm
11  {
12  public:
13  inline static constexpr auto RTTI = RTTI_BGSOutfit;
14  inline static constexpr auto VTABLE = VTABLE_BGSOutfit;
15  inline static constexpr auto FORMTYPE = FormType::Outfit;
16 
17  struct RecordFlags
18  {
19  enum RecordFlag : std::uint32_t
20  {
21  kDeleted = 1 << 5,
22  kIgnored = 1 << 12
23  };
24  };
25 
26  ~BGSOutfit() override; // 00
27 
28  // override (TESForm)
29  void ClearData() override; // 05
30  bool Load(TESFile* a_mod) override; // 06
31  void InitItemImpl() override; // 13
32 
33  void ForEachItem(std::function<BSContainer::ForEachResult(TESForm*)> a_callback) const
34  {
35  for (auto& item : outfitItems) {
36  if (item && a_callback(item) == BSContainer::ForEachResult::kStop) {
37  return;
38  }
39  }
40  }
41 
42  // members
44  };
45  static_assert(sizeof(BGSOutfit) == 0x38);
46 }
Definition: BGSOutfit.h:11
static constexpr auto RTTI
Definition: BGSOutfit.h:13
static constexpr auto VTABLE
Definition: BGSOutfit.h:14
BSTArray< TESForm * > outfitItems
Definition: BGSOutfit.h:43
static constexpr auto FORMTYPE
Definition: BGSOutfit.h:15
void InitItemImpl() override
~BGSOutfit() override
bool Load(TESFile *a_mod) override
void ForEachItem(std::function< BSContainer::ForEachResult(TESForm *)> a_callback) const
Definition: BGSOutfit.h:33
void ClearData() override
Definition: BSTArray.h:377
Definition: TESFile.h:17
Definition: TESForm.h:36
ForEachResult
Definition: BSContainer.h:6
Definition: AbsorbEffect.h:6
constexpr std::array< REL::VariantID, 1 > VTABLE_BGSOutfit
Definition: Offsets_VTABLE.h:474
constexpr REL::VariantID RTTI_BGSOutfit(513971, 392777, 0x1ede288)
Definition: BGSOutfit.h:18
RecordFlag
Definition: BGSOutfit.h:20
@ kDeleted
Definition: BGSOutfit.h:21
@ kIgnored
Definition: BGSOutfit.h:22