diff --git a/cmake/sourcelist.cmake b/cmake/sourcelist.cmake index df1c8291c..77176eb8f 100644 --- a/cmake/sourcelist.cmake +++ b/cmake/sourcelist.cmake @@ -1190,6 +1190,8 @@ set(SOURCES include/RE/M/MagicFormulas.h include/RE/M/MagicItem.h include/RE/M/MagicItemDataCollector.h + include/RE/M/MagicItemFindFunctor.h + include/RE/M/MagicItemFindKeywordFunctor.h include/RE/M/MagicItemTraversalFunctor.h include/RE/M/MagicMenu.h include/RE/M/MagicSystem.h diff --git a/include/RE/M/MagicItemFindFunctor.h b/include/RE/M/MagicItemFindFunctor.h new file mode 100644 index 000000000..31854bf2d --- /dev/null +++ b/include/RE/M/MagicItemFindFunctor.h @@ -0,0 +1,26 @@ +#pragma once + +#include "RE/M/MagicItemTraversalFunctor.h" + +namespace RE +{ + class MagicItemFindFunctor : public MagicItemTraversalFunctor + { + public: + inline static constexpr auto RTTI = RTTI_MagicItemFindFunctor; + inline static constexpr auto VTABLE = VTABLE_MagicItemFindFunctor; + + ~MagicItemFindFunctor() override; // 00 + + // override (MagicItemTraversalFunctor) + BSContainer::ForEachResult operator()(Effect* a_effect) override; // 01 + + // add + virtual bool MatchCondition(Effect* a_effect) = 0; // 02 + + // members + std::int32_t indexCount; // 10 + std::uint32_t pad14; // 14 + }; + static_assert(sizeof(MagicItemFindFunctor) == 0x18); +} diff --git a/include/RE/M/MagicItemFindKeywordFunctor.h b/include/RE/M/MagicItemFindKeywordFunctor.h new file mode 100644 index 000000000..c4165c533 --- /dev/null +++ b/include/RE/M/MagicItemFindKeywordFunctor.h @@ -0,0 +1,24 @@ +#pragma once + +#include "RE/M/MagicItemFindFunctor.h" + +namespace RE +{ + class BGSKeyword; + + class MagicItemFindKeywordFunctor : public MagicItemFindFunctor + { + public: + inline static constexpr auto RTTI = RTTI_MagicItemFindKeywordFunctor; + inline static constexpr auto VTABLE = VTABLE_MagicItemFindKeywordFunctor; + + ~MagicItemFindKeywordFunctor() override; // 00 + + // override (MagicItemFindFunctor) + bool MatchCondition(Effect* a_effect) override; // 02 + + // members + BGSKeyword* keyword; // 18 + }; + static_assert(sizeof(MagicItemFindKeywordFunctor) == 0x20); +}