mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 10:52: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& ItemInstances = GetItemList().GetItemInstances();
|
||||||
auto& ReplicatedEntries = GetItemList().GetReplicatedEntries();
|
auto& ReplicatedEntries = GetItemList().GetReplicatedEntries();
|
||||||
|
|
||||||
|
auto OldItemCount = ReplicatedEntry->GetCount();
|
||||||
auto NewCount = ReplicatedEntry->GetCount() - Count;
|
auto NewCount = ReplicatedEntry->GetCount() - Count;
|
||||||
|
|
||||||
bool bOverrideChangeStackSize = false;
|
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;
|
bool bIsFinalStack = true;
|
||||||
|
|
||||||
@@ -297,8 +298,10 @@ bool AFortInventory::RemoveItem(const FGuid& ItemGuid, bool* bShouldUpdate, int
|
|||||||
|
|
||||||
if (bIsFinalStack)
|
if (bIsFinalStack)
|
||||||
{
|
{
|
||||||
NewCount = NewCount < 0 ? 0 : NewCount; // min(NewCount, 0) or something i forgot
|
NewCount = NewCount < 0 ? 0 : NewCount; // min(NewCount, 0) or something i forgot // hm?
|
||||||
bOverrideChangeStackSize = true;
|
|
||||||
|
if (OldItemCount == 0) // hm?
|
||||||
|
bOverrideChangeStackSize = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ public:
|
|||||||
return ReadBitfieldValue(bIgnoreRespawningForDroppingAsPickupOffset, bIgnoreRespawningForDroppingAsPickupFieldMask);
|
return ReadBitfieldValue(bIgnoreRespawningForDroppingAsPickupOffset, bIgnoreRespawningForDroppingAsPickupFieldMask);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ShouldPersistWhenFinalStackEmpty()
|
bool ShouldPersistWhenFinalStackEmpty() // Used for Batman Grapnel
|
||||||
{
|
{
|
||||||
static auto bPersistInInventoryWhenFinalStackEmptyOffset = GetOffset("bPersistInInventoryWhenFinalStackEmpty", false);
|
static auto bPersistInInventoryWhenFinalStackEmptyOffset = GetOffset("bPersistInInventoryWhenFinalStackEmpty", false);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user