@@ -33,15 +33,16 @@ public async Task<CommonBaidResponse> Handle(BaidQuery request, CancellationToke
3333
3434 var songBestData = context . SongBestData . Where ( datum => datum . Baid == baid ) . ToList ( ) ;
3535 var achievementDisplayDifficulty = userData . AchievementDisplayDifficulty ;
36- // Please Do not rewrite Difficulty.None, it will lock your Difficulty Panel level in one play
37- // if (achievementDisplayDifficulty == Difficulty.None)
38- // {
39- // achievementDisplayDifficulty = songBestData
40- // .Where(datum => datum.BestCrown >= CrownType.Clear)
41- // .Select(datum => datum.Difficulty)
42- // .DefaultIfEmpty(Difficulty.Easy)
43- // .Max();
44- // }
36+ var isDispAchievementTypeSet = true ;
37+ if ( achievementDisplayDifficulty == Difficulty . None )
38+ {
39+ isDispAchievementTypeSet = false ;
40+ achievementDisplayDifficulty = songBestData
41+ . Where ( datum => datum . BestCrown >= CrownType . Clear )
42+ . Select ( datum => datum . Difficulty )
43+ . DefaultIfEmpty ( Difficulty . Easy )
44+ . Max ( ) ;
45+ }
4546 // For each crown type, calculate how many songs have that crown type
4647 var crownCountData = songBestData
4748 . Where ( datum => ! timeLimitSongsList . Contains ( datum . SongId ) && ( datum . Difficulty == achievementDisplayDifficulty || ( achievementDisplayDifficulty == Difficulty . UraOni && datum . Difficulty == Difficulty . Oni ) ) )
@@ -124,8 +125,9 @@ public async Task<CommonBaidResponse> Handle(BaidQuery request, CancellationToke
124125 CostumeData = costumeData ,
125126 CostumeFlagArrays = costumeFlagArrays ,
126127 DisplayDan = userData . DisplayDan ,
127- DisplaySouUchi = userData . DisplaySouUchi ,
128+ IsDispSouuchiOn = userData . DisplaySouUchi ,
128129 DispAchievementType = ( uint ) achievementDisplayDifficulty ,
130+ IsDispAchievementTypeSet = isDispAchievementTypeSet ,
129131 GenericInfoFlg = genericInfoFlgArray ,
130132 GotDanFlg = gotDanFlagArray ,
131133 GotDanMax = maxDan ,
0 commit comments