sp-tarkov / server

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

[Bug]Ammo packs bought on flea have 0/x ammo in them and cannot be opened. #643

Closed refringe closed 2 hours ago

refringe commented 2 hours ago

Issue is for: Server

Expected Result: Have x/x ammo not 0/x ammo after buying packs off the flea.

Actual Result: The ammo backs have 0/x ammo and cannot be opened after buying off the flea.

Description: You buy an ammo pack off the flea and it comes with no ammo inside and the option to unpack is blacked out and cannot be clicked, but buying ammo packs off the traders directly works just fine and you have the ammo in the pack and can be unpacked.

How to reproduce:

  1. go to flea
  2. buy any ammo pack
  3. go to stash
  4. check ammo pack

Attachments


Originally written by Schizo1940

refringe commented 2 hours ago

possibly linked with issue #297 as ammo boxes not being consumed


Originally written by naterade

refringe commented 2 hours ago

Looks like the recent move to addItemToStash doesn't call hydrateAmmoBoxWithAmmo() like addItem() does.

I'm going to work on an update. I'll put out a PR if no one beats me to it.


Originally written by Spoony

refringe commented 2 hours ago

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


Originally written by chomp

refringe commented 2 hours ago

Tested with latest build as of 0842 EST 1/16/2024 with commit fbee59fede. Can confirm issue can be closed


Originally written by naterade