- Fixed bug where some items that were at the root of sent items wouldn't have their slotIds changed to "main", which resulted in people not being able to receive them
Turns out `Array.filter` returns the filtered array, it doesn't modify the passed in array
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/277
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
This fixes a bug I found that the server uses partially old logic when using the ``traderConfig.persistPurchaseDataInProfile``
Now it works fine for multiple profiles.
How to test before and after
```
start server
make dev account
buy something trade limited like ASH12 ammo. (Buy all)
make new dev account
try to buy same thing
```
Before it gave the user the error that you've already reached the limit. Even when you had bought nothing on that profile.
Now the trader properly sells you the stuff, with your own profile limit.
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/276
Co-authored-by: Leaves <mwarciel@gmail.com>
Co-committed-by: Leaves <mwarciel@gmail.com>
Added small optimisation to only process water filters if a water filter is installed
Added crafting skill bonus to water filter craft time calculation
Various variable/comment renames for clarity
This PR is required by SPT-AKI/Modules!104 in order for it to function correctly.
## Overview
- Adds the package `buffer-crc32`, it can generate CRC32 hashes from buffers or strings
- Splits `HashCacheService` into 2 classes `ModHashCacheService` does exactly the same `HashCacheService` used to do, and added a new `BundleHashCacheService`
- `BundleLoader` now generates a CRC32 hash of every bundle file from every loaded mod
- Reworked `BundleInfo` to better represent the data expected by the client when requesting `/singleplayer/bundles`
- Removes all checks on `BundleLoader` that verified if the request was made to a localhost address, this is now addressed by the client.
## Testing
The code has been tested by @Senko-san and me.
Co-authored-by: chomp <chomp@noreply.dev.sp-tarkov.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/274
Co-authored-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
Co-committed-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
This check simply skips over rolling for insurance for attachment items that have already been deleted due to their main-parent item being previously rolled for deletion.