sp-tarkov / server

University of Illinois/NCSA Open Source License
26 stars 10 forks source link

Trying to buy too many items that cannot fit in stash will not remove money #541

Closed refringe closed 1 week ago

refringe commented 1 week ago

General information:

Project issue is for: SPT AKI (3.8.0) Bleeding Edge Test

Expected result:
Purchase should not happen.

Actual result:
Stash fills with items purchased as much as possible, but no money is taken.

How to reproduce:

  1. Have a relatively full stash. I'd say 4-6 cells open.
  2. Buy too many items from flea market, easier with ammo. Try 9x18mm PM P gzh.
  3. Items are added to stash, "not enough stash space" error pops up.
  4. No money removed, items added to stash.

Originally written by bandit

refringe commented 1 week ago

Also works when buying direct from traders


Originally written by bandit

refringe commented 1 week ago

Seems to work in the inverse as well. Selling too much (14m worth of items) with no space for the money to go to will cause the items to disappear and the money not to be provided to you.


Originally written by bandit

refringe commented 1 week ago

buyItem() will need some rework to make use of addItemsToStash() instead of addItemToStash().

it does a space check prior to adding any item.


Originally written by chomp

refringe commented 1 week ago

Fixed with: https://dev.sp-tarkov.com/SPT-AKI/Server/commit/183e71370a589d3752bc2554b9df2f9ffb28de5b


Originally written by chomp

refringe commented 1 week ago

Went to sell to mechanic, selected a bunch of guns from my inventory, 3 x m9a3's and then some parts off of an AKMN (while they were still attached to the AKMN) and received an error that the purchase could not happen, but still lost all of the gear and didn't receive any of the 120k+ roubles that it was saying the trade was worth. Updated to most recent as of a few minutes after it's release this morning (0955 CST((GMT-6)) Also worth noting, i had plenty of room in my stash for the money to have gone to. image


Attachments


Originally written by Anonymouswrex

refringe commented 1 week ago

Hello, testing exactly what was wrote to reproduce this and can confirm the purchase does NOT go through and no money is taken. https://youtu.be/DNdbzb8isYo


Attachments


Originally written by Dabi7582