Skip to content

Commit

Permalink
Merge pull request #87 from Bobbyclue/CarryWeight-Functions
Browse files Browse the repository at this point in the history
Add Actor::GetTotalCarryWeight and InventoryChanges::GetInventoryWeight
  • Loading branch information
powerof3 authored Oct 1, 2023
2 parents d755bca + 2c297f6 commit 383faac
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/RE/A/Actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions include/RE/I/InventoryChanges.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
7 changes: 7 additions & 0 deletions src/RE/A/Actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,13 @@ namespace RE
return func(this);
}

float Actor::GetTotalCarryWeight()
{
using func_t = decltype(&Actor::GetTotalCarryWeight);
REL::Relocation<func_t> func{ RELOCATION_ID(36456, 37452) };
return func(this);
}

TESFaction* Actor::GetVendorFaction()
{
if (!vendorFaction) {
Expand Down
7 changes: 7 additions & 0 deletions src/RE/I/InventoryChanges.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ namespace RE
return func(this, a_slot);
}

float InventoryChanges::GetInventoryWeight()
{
using func_t = decltype(&InventoryChanges::GetInventoryWeight);
REL::Relocation<func_t> func{ RELOCATION_ID(15883, 16123) };
return func(this);
}

std::uint16_t InventoryChanges::GetNextUniqueID()
{
using func_t = decltype(&InventoryChanges::GetNextUniqueID);
Expand Down

0 comments on commit 383faac

Please sign in to comment.