1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 12:35:34 +08:00

Merge pull request #24538 from smoogipoo/temp-optional-difficulty-attribs

Temporarily allow new difficulty attributes to not exist
This commit is contained in:
Dean Herbert 2023-08-14 17:33:30 +09:00 committed by GitHub
commit fd3f5d8e79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,9 +104,11 @@ namespace osu.Game.Rulesets.Difficulty
public virtual void FromDatabaseAttributes(IReadOnlyDictionary<int, double> values, IBeatmapOnlineInfo onlineInfo)
{
MaxCombo = (int)values[ATTRIB_ID_MAX_COMBO];
LegacyAccuracyScore = (int)values[ATTRIB_ID_LEGACY_ACCURACY_SCORE];
LegacyComboScore = (int)values[ATTRIB_ID_LEGACY_COMBO_SCORE];
LegacyBonusScoreRatio = (int)values[ATTRIB_ID_LEGACY_BONUS_SCORE_RATIO];
// Temporarily allow these attributes to not exist so as to not block releases of server-side components while these attributes aren't populated/used yet.
LegacyAccuracyScore = (int)values.GetValueOrDefault(ATTRIB_ID_LEGACY_ACCURACY_SCORE);
LegacyComboScore = (int)values.GetValueOrDefault(ATTRIB_ID_LEGACY_COMBO_SCORE);
LegacyBonusScoreRatio = (int)values.GetValueOrDefault(ATTRIB_ID_LEGACY_BONUS_SCORE_RATIO);
}
}
}