Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions GenOnlineService/Database/Database.User.cs
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,8 @@ public static async Task<EloData> GetELOData(AppDbContext db, long userId)
if (apiElo != null)
{
// Persist retrieved rating to DB asynchronously for fallback
// await SaveELOData(db, userId, apiElo);
// return apiElo;
await SaveELOData(db, userId, apiElo);
return apiElo;
}
}
catch (Exception ex)
Expand Down
6 changes: 3 additions & 3 deletions GenOnlineService/ExternalLeaderboardsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,12 @@ await retryPolicy.ExecuteAsync(async () =>
var sharedData = WebSocketManager.GetSharedDataForUser(userId);
if (sharedData?.GameStats != null)
{
// sharedData.GameStats.EloRating = newRating;
// sharedData.GameStats.EloMatches = newMatches;
sharedData.GameStats.EloRating = newRating;
sharedData.GameStats.EloMatches = newMatches;
}

// Call SaveELOData to persist as fallback
// await Database.Users.SaveELOData(db, userId, new EloData(newRating, newMatches));
await Database.Users.SaveELOData(db, userId, new EloData(newRating, newMatches));
}
}
}
Expand Down
6 changes: 0 additions & 6 deletions GenOnlineService/LobbyManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1548,12 +1548,6 @@ public async Task<bool> DeleteLobby(Lobby lobby)
// make sure we have a winner
await Database.MatchHistory.DetermineLobbyWinnerIfNotPresent(db, lobby);

// if its a quickmatch, update our leaderboards
if (lobby.LobbyType == ELobbyType.QuickMatch)
{
await Database.MatchHistory.UpdateLeaderboardAndElo(db, lobby);
}

// Post match result to external leaderboard API for every lobby type.
// Only QuickMatch responses are expected to carry a ratings body.
await ExternalLeaderboardsClient.PostMatchResultAsync(db, lobby);
Expand Down
Loading