Use async DB queries.

This commit is contained in:
Pieter-Jan Briers
2020-06-26 03:46:08 +02:00
parent 357c110535
commit 579ff6bb26
20 changed files with 656 additions and 148 deletions

View File

@@ -19,7 +19,7 @@ namespace Content.Server.GameTicking
private readonly Dictionary<string, int> _spawnedPositions = new Dictionary<string, int>();
private Dictionary<IPlayerSession, string> AssignJobs(List<IPlayerSession> available,
Dictionary<IPlayerSession, HumanoidCharacterProfile> profiles)
Dictionary<string, HumanoidCharacterProfile> profiles)
{
// Calculate positions available round-start for each job.
var availablePositions = GetBasePositions(true);
@@ -38,7 +38,7 @@ namespace Content.Server.GameTicking
var candidates = available
.Select(player =>
{
var profile = profiles[player];
var profile = profiles[player.Name];
var availableJobs = profile.JobPriorities
.Where(j =>