[F] RatingUpWhenSSSp Algo
Build AquaMai / build (push) Has been cancelled Details

pull/84/head
Clansty 2024-11-16 01:47:07 +08:00
parent 0455a83ef1
commit cd075a3559
No known key found for this signature in database
GPG Key ID: 3A6BE8BAF2EDE134
1 changed files with 11 additions and 4 deletions

View File

@ -113,12 +113,19 @@ public class SelectionDetail
private uint CalcB50(MusicData musicData, int difficulty) private uint CalcB50(MusicData musicData, int difficulty)
{ {
var newRate = new UserRate(musicData.name.id, difficulty, 1010000, (uint)musicData.version); var theory = new UserRate(musicData.name.id, difficulty, 1010000, (uint)musicData.version);
var userLowRate = (newRate.OldFlag ? userData.RatingList.RatingList : userData.RatingList.NewRatingList).Last(); var list = theory.OldFlag ? userData.RatingList.RatingList : userData.RatingList.NewRatingList;
var userLowRate = list.Last();
var userSongRate = list.FirstOrDefault(it => it.MusicId == musicData.name.id && it.Level == difficulty);
if (newRate.SingleRate > userLowRate.SingleRate) if (!userSongRate.Equals(default(UserRate)))
{ {
return newRate.SingleRate - userLowRate.SingleRate; return theory.SingleRate - userSongRate.SingleRate;
}
if (theory.SingleRate > userLowRate.SingleRate)
{
return theory.SingleRate - userLowRate.SingleRate;
} }
return 0; return 0;