Skip to content

Commit

Permalink
Merge pull request #228 from smoogipoo/add-new-scoring-attribs
Browse files Browse the repository at this point in the history
Add new score attribute columns
  • Loading branch information
peppy authored Dec 13, 2023
2 parents 6fbd071 + 936d038 commit 6f96c19
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
10 changes: 6 additions & 4 deletions osu.Server.DifficultyCalculator/ServerDifficultyCalculator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,16 +191,18 @@ private void processLegacyAttributes(int beatmapId, WorkingBeatmap beatmap, Rule
return;

conn.Execute(
"INSERT INTO `osu_beatmap_scoring_attribs` (`beatmap_id`, `mode`, `legacy_accuracy_score`, `legacy_combo_score`, `legacy_bonus_score_ratio`) "
+ "VALUES (@BeatmapId, @Mode, @AccuracyScore, @ComboScore, @BonusScoreRatio) "
+ "ON DUPLICATE KEY UPDATE `legacy_accuracy_score` = @AccuracyScore, `legacy_combo_score` = @ComboScore, `legacy_bonus_score_ratio` = @BonusScoreRatio",
"INSERT INTO `osu_beatmap_scoring_attribs` (`beatmap_id`, `mode`, `legacy_accuracy_score`, `legacy_combo_score`, `legacy_bonus_score_ratio`, `legacy_bonus_score`, `max_combo`) "
+ "VALUES (@BeatmapId, @Mode, @AccuracyScore, @ComboScore, @BonusScoreRatio, @BonusScore, @MaxCombo) "
+ "ON DUPLICATE KEY UPDATE `legacy_accuracy_score` = @AccuracyScore, `legacy_combo_score` = @ComboScore, `legacy_bonus_score_ratio` = @BonusScoreRatio, `legacy_bonus_score` = @BonusScore, `max_combo` = @MaxCombo",
new
{
BeatmapId = beatmapId,
Mode = ruleset.RulesetInfo.OnlineID,
AccuracyScore = attributes.AccuracyScore,
ComboScore = attributes.ComboScore,
BonusScoreRatio = attributes.BonusScoreRatio
BonusScoreRatio = attributes.BonusScoreRatio,
BonusScore = attributes.BonusScore,
MaxCombo = attributes.MaxCombo
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="MySqlConnector" Version="2.2.7" />
<PackageReference Include="ppy.osu.Game" Version="2023.928.0" />
<PackageReference Include="ppy.osu.Game.Rulesets.Osu" Version="2023.928.0" />
<PackageReference Include="ppy.osu.Game.Rulesets.Taiko" Version="2023.928.0" />
<PackageReference Include="ppy.osu.Game.Rulesets.Catch" Version="2023.928.0" />
<PackageReference Include="ppy.osu.Game.Rulesets.Mania" Version="2023.928.0" />
<PackageReference Include="ppy.osu.Game" Version="2023.1213.0" />
<PackageReference Include="ppy.osu.Game.Rulesets.Osu" Version="2023.1213.0" />
<PackageReference Include="ppy.osu.Game.Rulesets.Taiko" Version="2023.1213.0" />
<PackageReference Include="ppy.osu.Game.Rulesets.Catch" Version="2023.1213.0" />
<PackageReference Include="ppy.osu.Game.Rulesets.Mania" Version="2023.1213.0" />
</ItemGroup>
<ItemGroup>
<None Update="appsettings.*.json">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<ItemGroup>
<PackageReference Include="Dapper" Version="2.0.151" />
<PackageReference Include="ppy.osu.Server.OsuQueueProcessor" Version="2023.822.0" />
<PackageReference Include="ppy.osu.Server.OsuQueueProcessor" Version="2023.1207.0" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 6f96c19

Please sign in to comment.