BSG added a new handler that's called when a new quest is added to the
quest list, this handler results in the first quest in a trader's task
list being selected whenever a new quest is added. This has the negative
effect of breaking replacing dailies for a trader with a daily from that
same trader, due to the selection happening _before_ the daily is
removed. Essentially resulting in a race condition where the code to
remove the old daily tries to remove the trader's first quest instead.
We can work around it by conditioning the call to `AutoSelectQuest` in
QuestAddedHandler. This does cause a change in behaviour from live, but
fixes the client freezing when getting a new daily from the trader
you're replacing the daily on.
Note: While this fixes a BSG bug, we can't avoid fixing it, because it
causes the UI to freeze when replacing daily quests We can retire this
patch once BSG fixes the underlying bug.
This synchronizes 310-dev with the later changes in master, resulting in
a clean merge of 310-dev into master
Supersedes #4 as that PR was missing a variable used elsewhere in the
codebase (Sorry Archangel!)
Make the GC only run on show inventory screen, and only allow it to run for a maximum of 25 milliseconds at a time.
Co-authored-by: Cj <161484149+CJ-SPT@users.noreply.github.com>
Reviewed-on: SPT/Modules#178
Co-authored-by: Cj <cj@noreply.dev.sp-tarkov.com>
Co-committed-by: Cj <cj@noreply.dev.sp-tarkov.com>
Attempt at slowing down the memory leak caused by bots spawning/dying
Co-authored-by: Cj <161484149+CJ-SPT@users.noreply.github.com>
Reviewed-on: SPT/Modules#177
Co-authored-by: Cj <cj@noreply.dev.sp-tarkov.com>
Co-committed-by: Cj <cj@noreply.dev.sp-tarkov.com>
This fixes the current issue of having an airdrop in the game causing a CTD after an extract.
There's still two caveats to this that I'm looking into:
- On the very next raid, the sky will still have the chaff from the flares in the sky, however these will have pink textures and take a few seconds to dissipate.
- On the very next raid, calling in an airplane with a red flare will cause the notification manager to spam messages about the airspace being currently in use even at the start of the raid.
Reviewed-on: SPT/Modules#175
Co-authored-by: Archangel <jesse@archangel.wtf>
Co-committed-by: Archangel <jesse@archangel.wtf>
This fixes the logic of FixSavageInventoryScreenPatch.
NOTE: The code below is untested and will most likely not work. It's what I theoretically believe is the right way to turn the `JObject` into a string for the server, however BSG has a `JsonWriter` in the client now that might have to be utilized? I will leave it like this until we have more info.
```c#
RequestHandler.PutJson("/raid/profile/scavsave",
GetProfileAtEndOfRaidPatch.ProfileDescriptor.ToUnparsedData([]).JObject.ToString());
```
Co-authored-by: Lacyway <20912169+Lacyway@users.noreply.github.com>
Reviewed-on: SPT/Modules#173
Co-authored-by: Lacyway <lacyway@noreply.dev.sp-tarkov.com>
Co-committed-by: Lacyway <lacyway@noreply.dev.sp-tarkov.com>