mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
grapnel,
This commit is contained in:
@@ -276,11 +276,12 @@ bool AFortInventory::RemoveItem(const FGuid& ItemGuid, bool* bShouldUpdate, int
|
||||
auto& ItemInstances = GetItemList().GetItemInstances();
|
||||
auto& ReplicatedEntries = GetItemList().GetReplicatedEntries();
|
||||
|
||||
auto OldItemCount = ReplicatedEntry->GetCount();
|
||||
auto NewCount = ReplicatedEntry->GetCount() - Count;
|
||||
|
||||
bool bOverrideChangeStackSize = false;
|
||||
|
||||
if (!bIgnoreVariables && ItemDefinition->ShouldPersistWhenFinalStackEmpty())
|
||||
if (!bIgnoreVariables && ItemDefinition->ShouldPersistWhenFinalStackEmpty()) // idk this whole branch is brain damage and definitely doesnt work as intended
|
||||
{
|
||||
bool bIsFinalStack = true;
|
||||
|
||||
@@ -297,8 +298,10 @@ bool AFortInventory::RemoveItem(const FGuid& ItemGuid, bool* bShouldUpdate, int
|
||||
|
||||
if (bIsFinalStack)
|
||||
{
|
||||
NewCount = NewCount < 0 ? 0 : NewCount; // min(NewCount, 0) or something i forgot
|
||||
bOverrideChangeStackSize = true;
|
||||
NewCount = NewCount < 0 ? 0 : NewCount; // min(NewCount, 0) or something i forgot // hm?
|
||||
|
||||
if (OldItemCount == 0) // hm?
|
||||
bOverrideChangeStackSize = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ public:
|
||||
return ReadBitfieldValue(bIgnoreRespawningForDroppingAsPickupOffset, bIgnoreRespawningForDroppingAsPickupFieldMask);
|
||||
}
|
||||
|
||||
bool ShouldPersistWhenFinalStackEmpty()
|
||||
bool ShouldPersistWhenFinalStackEmpty() // Used for Batman Grapnel
|
||||
{
|
||||
static auto bPersistInInventoryWhenFinalStackEmptyOffset = GetOffset("bPersistInInventoryWhenFinalStackEmpty", false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user