Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions include/RE/A/Actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_t> 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);
Expand Down
30 changes: 30 additions & 0 deletions include/RE/E/Events.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<SaveLoadEvent>* GetEventSource()
{
using func_t = decltype(&SaveLoadEvent::GetEventSource);
static REL::Relocation<func_t> 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
{
Expand Down
3 changes: 2 additions & 1 deletion include/RE/IDs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1855,7 +1856,7 @@ namespace RE::ID

namespace ShowHUDMessageEvent
{
inline constexpr REL::ID GetEventSource{ 0 }; // 133512
inline constexpr REL::ID GetEventSource{ 86800 };
}

namespace ShowingQuestMarketTextEvent
Expand Down
19 changes: 18 additions & 1 deletion include/RE/T/TESObjectREFR.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,23 @@ namespace RE
kConsumingIngredient
};

class TESObjectREFR;

struct RemoveItemRequest
{
TESBoundObject* object{ nullptr }; // 00
BSTSmartPointer<TBO_InstanceData> 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:
Expand Down Expand Up @@ -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
Expand Down
Loading