From 2c297f6faeaf751bdea8ca2df522c2f843c9cdb1 Mon Sep 17 00:00:00 2001 From: Bobbyclue Date: Thu, 28 Sep 2023 22:02:37 -0400 Subject: [PATCH] Added GetTotalCarryweight and GetInventoryWeight IDs --- include/RE/A/Actor.h | 1 + include/RE/I/InventoryChanges.h | 1 + src/RE/A/Actor.cpp | 7 +++++++ src/RE/I/InventoryChanges.cpp | 7 +++++++ 4 files changed, 16 insertions(+) diff --git a/include/RE/A/Actor.h b/include/RE/A/Actor.h index c332f1d04..38017deb7 100644 --- a/include/RE/A/Actor.h +++ b/include/RE/A/Actor.h @@ -547,6 +547,7 @@ namespace RE [[nodiscard]] TESObjectARMO* GetSkin() const; [[nodiscard]] TESObjectARMO* GetSkin(BGSBipedObjectForm::BipedObjectSlot a_slot, bool a_noInit = false); [[nodiscard]] SOUL_LEVEL GetSoulSize() const; + float GetTotalCarryWeight(); TESFaction* GetVendorFaction(); const TESFaction* GetVendorFaction() const; float GetVoiceRecoveryTime(); diff --git a/include/RE/I/InventoryChanges.h b/include/RE/I/InventoryChanges.h index aa8f5458d..c58de9b45 100644 --- a/include/RE/I/InventoryChanges.h +++ b/include/RE/I/InventoryChanges.h @@ -39,6 +39,7 @@ namespace RE void AddEntryData(InventoryEntryData* a_entry); TESObjectARMO* GetArmorInSlot(std::int32_t a_slot); + float GetInventoryWeight(); std::uint16_t GetNextUniqueID(); std::uint32_t GetWornMask(); void InitFromContainerExtra(); diff --git a/src/RE/A/Actor.cpp b/src/RE/A/Actor.cpp index 5e267bf37..858bb1176 100644 --- a/src/RE/A/Actor.cpp +++ b/src/RE/A/Actor.cpp @@ -559,6 +559,13 @@ namespace RE return func(this); } + float Actor::GetTotalCarryWeight() + { + using func_t = decltype(&Actor::GetTotalCarryWeight); + REL::Relocation func{ RELOCATION_ID(36456, 37452) }; + return func(this); + } + TESFaction* Actor::GetVendorFaction() { if (!vendorFaction) { diff --git a/src/RE/I/InventoryChanges.cpp b/src/RE/I/InventoryChanges.cpp index faaacce43..8b828eb64 100644 --- a/src/RE/I/InventoryChanges.cpp +++ b/src/RE/I/InventoryChanges.cpp @@ -34,6 +34,13 @@ namespace RE return func(this, a_slot); } + float InventoryChanges::GetInventoryWeight() + { + using func_t = decltype(&InventoryChanges::GetInventoryWeight); + REL::Relocation func{ RELOCATION_ID(15883, 16123) }; + return func(this); + } + std::uint16_t InventoryChanges::GetNextUniqueID() { using func_t = decltype(&InventoryChanges::GetNextUniqueID);