Esempio n. 1
0
        public static ChildrenBeatmap FromBeatmapInfo(BeatmapInfo info, BeatmapSetOnlineInfo setOnlineInfo, BeatmapSet parent = null)
        {
            if (info == null)
            {
                return(null);
            }

            var cb = new ChildrenBeatmap
            {
                BeatmapId        = info.OnlineBeatmapID ?? -1,
                ParentSetId      = info.BeatmapSetInfoID,
                Parent           = parent,
                DiffName         = info.Version,
                FileMd5          = info.MD5Hash,
                Mode             = (PlayMode)info.RulesetID,
                Ar               = info.BaseDifficulty.ApproachRate,
                Od               = info.BaseDifficulty.OverallDifficulty,
                Cs               = info.BaseDifficulty.CircleSize,
                Hp               = info.BaseDifficulty.DrainRate,
                TotalLength      = (int)info.OnlineInfo.Length,
                HitLength        = (int)info.StackLeniency,
                Playcount        = info.OnlineInfo.PassCount,
                Bpm              = setOnlineInfo.BPM,
                MaxCombo         = info.OnlineInfo.CircleCount,
                DifficultyRating = info.StarDifficulty
            };

            return(cb);
        }