diff --git a/include/RE/A/Actor.h b/include/RE/A/Actor.h index 63dd0a7..51fd025 100644 --- a/include/RE/A/Actor.h +++ b/include/RE/A/Actor.h @@ -285,6 +285,15 @@ namespace RE virtual void Unk_1A0(); // 1A0 virtual void Unk_1A1(); // 1A1 + // adds the item to the inventory first if the actor doesn't have it (ActorEquipManager::EquipObject does nothing in that case); + // what Papyrus Actor.EquipItem calls + void EquipItem(TESBoundObject* a_object, bool a_preventRemoval = false, bool a_silent = false) + { + using func_t = decltype(&Actor::EquipItem); + static REL::Relocation func{ ID::Actor::EquipItem }; + func(this, a_object, a_preventRemoval, a_silent); + } + void EvaluatePackage(bool a_immediate = false, bool a_resetAI = false) { using func_t = decltype(&Actor::EvaluatePackage); diff --git a/include/RE/E/Events.h b/include/RE/E/Events.h index 06a0212..edb998a 100644 --- a/include/RE/E/Events.h +++ b/include/RE/E/Events.h @@ -2625,13 +2625,43 @@ namespace RE struct SaveLoadEvent { + enum class OpType : std::uint8_t + { + kAutosave = 1, + kLoadMostRecent = 2, + kQuicksave = 3, + kQuickload = 4, + kManualSave = 5, + kLoad = 6, + kExitSaveToMainMenu = 7, + kExitSaveToDesktop = 8, + kLoadNamedFile = 0xB, + }; + + enum class Status : std::uint8_t + { + kBegin = 0, + kLoadSucceeded = 1, + kFailed = 3, + kSaveCompleted = 4, + kLoadDispatchRefused = 5, + }; + [[nodiscard]] static BSTEventSource* GetEventSource() { using func_t = decltype(&SaveLoadEvent::GetEventSource); static REL::Relocation func{ ID::SaveLoadEvent::GetEventSource }; return func(); } + + // members + std::uint32_t elapsedMs; // 00 + std::uint32_t fileSizeBytes; // 04 + std::uint32_t unk08; // 08 + OpType opType; // 0C + Status status; // 0D }; + static_assert(sizeof(SaveLoadEvent) == 0x10); struct SecurityMenu_BackOutKey { diff --git a/include/RE/IDs.h b/include/RE/IDs.h index e5f5277..4ef9e10 100644 --- a/include/RE/IDs.h +++ b/include/RE/IDs.h @@ -14,6 +14,7 @@ namespace RE::ID namespace Actor { + inline constexpr REL::ID EquipItem{ 101349 }; inline constexpr REL::ID EvaluatePackage{ 0 }; // 150640 inline constexpr REL::ID GetActorKnowledge{ 0 }; // 150669 inline constexpr REL::ID IsHostileToActor{ 0 }; // 150777 @@ -1855,7 +1856,7 @@ namespace RE::ID namespace ShowHUDMessageEvent { - inline constexpr REL::ID GetEventSource{ 0 }; // 133512 + inline constexpr REL::ID GetEventSource{ 86800 }; } namespace ShowingQuestMarketTextEvent diff --git a/include/RE/T/TESObjectREFR.h b/include/RE/T/TESObjectREFR.h index 1d8bb49..b1de2bd 100644 --- a/include/RE/T/TESObjectREFR.h +++ b/include/RE/T/TESObjectREFR.h @@ -97,6 +97,23 @@ namespace RE kConsumingIngredient }; + class TESObjectREFR; + + struct RemoveItemRequest + { + TESBoundObject* object{ nullptr }; // 00 + BSTSmartPointer instanceData; // 08 + ExtraDataList* extra{ nullptr }; // 10 + std::int32_t inventoryIndex{ -1 }; // 18 + std::int32_t count{ 1 }; // 1C + ITEM_TRANSFER_REASON reason{ ITEM_TRANSFER_REASON::kNone }; // 20 + std::uint32_t pad24{ 0 }; // 24 + TESObjectREFR* moveTo{ nullptr }; // 28 + NiPoint3* dropLocation{ nullptr }; // 30 + NiPoint3* dropRotation{ nullptr }; // 38 + }; + static_assert(sizeof(RemoveItemRequest) == 0x40); + struct OBJ_REFR { public: @@ -181,7 +198,7 @@ namespace RE virtual void Unk_88(); // 088 virtual void Unk_89(); // 089 virtual void Unk_8A(); // 08A - virtual void Unk_8B(); // 08B + virtual void RemoveItem(std::uint32_t& a_outHandle, const RemoveItemRequest& a_request); // 08B virtual void Unk_8C(); // 08C virtual void Unk_8D(); // 08D virtual void Unk_8E(); // 08E