Better handle rewards not fitting (they shouldn't just poof) by instead
trimming the rewards amount until they fit.
(cherry picked from commit 8d05bf0069b22968d7e4fcdc4901ae0babd948c3)
Reworked Cultist circle code to pass blacklist around as a set rather than array
Removed cultist circle use of `itemRewardBlacklist` to store item parent ids, feature is handled by new config property
Removed hard-coded money/ammo blacklist from `generateRandomisedItemsAndAddToRewardPool()` and moved into config
Updated function to check chosen reward items parentid against item reward blacklist
Brings Cultist Cicle rewards closer to live behavior.
---------
Co-authored-by: Bob S <shibdib@users.noreply.github.com>
Co-authored-by: Chomp <dev@dev.sp-tarkov.com>
- Resolve issue where we were storing favorites in the incorrect format,
resulting in a client error on game load
- Resolve issue where we were clearing favorites when they were meant to
be saved
- On login, fix any previously corrupted favorites array
- Properly implement favorite data in `getOtherProfile`, now shows your
favorites when viewing your profile
Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>
This started as a small update.
This pull request includes updates to the `RandomUtil` class to improve
the security and accuracy of random number generation by utilizing the
`node:crypto` module. Additionally, it enhances the documentation and
refactors several methods for clarity and performance.
Includes tests, both before and after the changes.
The only *possible* breaking change is that now the `getKey`,
`getKeyValue`, and `drawRandomFromDict` methods are typed with generics
instead of `any`. I tried to keep them as *generic* as possible, but we
should probably include this in a BE to ensure it doesn't break
anything.
No further changes are planned--Saved as a draft because it's late and I
still want to review.
---------
Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>