2022-10-26 18:42:11 +02:00
|
|
|
|
using SharedProject.Enums;
|
|
|
|
|
|
|
|
|
|
namespace GameDatabase.Entities;
|
2022-08-27 18:34:27 +02:00
|
|
|
|
|
|
|
|
|
public partial class SongBestDatum
|
|
|
|
|
{
|
|
|
|
|
public void UpdateBestData(CrownType crown, uint scoreRank, uint playScore, uint scoreRate)
|
|
|
|
|
{
|
|
|
|
|
if (BestCrown < crown)
|
|
|
|
|
{
|
|
|
|
|
BestCrown = crown;
|
|
|
|
|
}
|
2022-10-26 18:42:41 +02:00
|
|
|
|
|
2022-08-27 18:34:27 +02:00
|
|
|
|
if ((uint)BestScoreRank < scoreRank)
|
|
|
|
|
{
|
2022-10-26 18:42:41 +02:00
|
|
|
|
BestScoreRank = (ScoreRank)scoreRank;
|
2022-08-27 18:34:27 +02:00
|
|
|
|
}
|
2022-10-26 18:42:41 +02:00
|
|
|
|
|
2022-08-27 18:34:27 +02:00
|
|
|
|
if (BestScore < playScore)
|
|
|
|
|
{
|
|
|
|
|
BestScore = playScore;
|
|
|
|
|
}
|
2022-10-26 18:42:41 +02:00
|
|
|
|
|
2022-08-27 18:34:27 +02:00
|
|
|
|
if (BestRate < scoreRate)
|
|
|
|
|
{
|
|
|
|
|
BestRate = scoreRate;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|