1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 09:58:21 +08:00

Add per-ruleset mappings

This commit is contained in:
Dean Herbert 2019-02-04 12:31:05 +09:00
parent 2d7c23dd9f
commit cd92dddd46

View File

@ -59,18 +59,32 @@ namespace osu.Game.Scoring.Legacy
var windows = currentRuleset.CreateRulesetContainerWith(workingBeatmap).CreateScoreProcessor().CreateHitWindows(); var windows = currentRuleset.CreateRulesetContainerWith(workingBeatmap).CreateScoreProcessor().CreateHitWindows();
if (windows.IsHitResultAllowed(HitResult.Great)) switch (currentRuleset.LegacyID)
score.ScoreInfo.Statistics[HitResult.Great] = count300; {
if (windows.IsHitResultAllowed(HitResult.Good)) case 0:
score.ScoreInfo.Statistics[HitResult.Good] = count100; score.ScoreInfo.Statistics[HitResult.Great] = count300;
if (windows.IsHitResultAllowed(HitResult.Meh)) score.ScoreInfo.Statistics[HitResult.Good] = count100;
score.ScoreInfo.Statistics[HitResult.Meh] = count50; score.ScoreInfo.Statistics[HitResult.Meh] = count50;
if (windows.IsHitResultAllowed(HitResult.Perfect)) score.ScoreInfo.Statistics[HitResult.Miss] = countMiss;
score.ScoreInfo.Statistics[HitResult.Perfect] = countGeki; break;
if (windows.IsHitResultAllowed(HitResult.Ok)) case 1:
score.ScoreInfo.Statistics[HitResult.Ok] = countKatu; score.ScoreInfo.Statistics[HitResult.Great] = count300;
if (windows.IsHitResultAllowed(HitResult.Miss)) score.ScoreInfo.Statistics[HitResult.Good] = count100;
score.ScoreInfo.Statistics[HitResult.Miss] = countMiss; score.ScoreInfo.Statistics[HitResult.Miss] = countMiss;
break;
case 2:
score.ScoreInfo.Statistics[HitResult.Perfect] = count300;
score.ScoreInfo.Statistics[HitResult.Miss] = countMiss;
break;
case 3:
score.ScoreInfo.Statistics[HitResult.Perfect] = countGeki;
score.ScoreInfo.Statistics[HitResult.Great] = count300;
score.ScoreInfo.Statistics[HitResult.Good] = countKatu;
score.ScoreInfo.Statistics[HitResult.Ok] = count100;
score.ScoreInfo.Statistics[HitResult.Meh] = count50;
score.ScoreInfo.Statistics[HitResult.Miss] = countMiss;
break;
}
score.ScoreInfo.TotalScore = sr.ReadInt32(); score.ScoreInfo.TotalScore = sr.ReadInt32();
score.ScoreInfo.MaxCombo = sr.ReadUInt16(); score.ScoreInfo.MaxCombo = sr.ReadUInt16();