コード例 #1
0
        private static BeatmapData InjectCustomData(BeatmapLineData[] beatmapLineData, BeatmapEventData[] beatmapEventData,
                                                    BeatmapDataLoader beatmapDataLoader, dynamic RawBPMChanges, float shuffle, float shufflePeriod)
        {
            List <CustomBeatmapSaveData.CustomEventData> customEventsSaveData = customBeatmapSaveData.customEvents;
            List <CustomEventData> customEvents = new List <CustomEventData>(customEventsSaveData.Count);

            foreach (CustomBeatmapSaveData.CustomEventData customEventData in customEventsSaveData)
            {
                int   num  = 0;
                float time = customEventData.time;

                // BeatmapDataLoader's BPMChangeData is private so we get to do a crap top of reflection to convert it to our BPMChangeData
                Type BPMChangeData = Type.GetType("BeatmapDataLoader+BPMChangeData,Main");
                List <BPMChangeData> BPMChanges = new List <BPMChangeData>();
                foreach (object i in RawBPMChanges as IEnumerable)
                {
                    float bpmChangeStartTime    = (float)BPMChangeData.GetField("bpmChangeStartTime").GetValue(i);
                    float bpmChangeStartBPMTime = (float)BPMChangeData.GetField("bpmChangeStartBPMTime").GetValue(i);
                    float bpm = (float)BPMChangeData.GetField("bpm").GetValue(i);

                    BPMChanges.Add(new BPMChangeData(bpmChangeStartTime, bpmChangeStartBPMTime, bpm));
                }

                while (num < BPMChanges.Count - 1 && BPMChanges[num + 1].bpmChangeStartBPMTime < time)
                {
                    num++;
                }
                BPMChangeData bpmchangeData = BPMChanges[num];
                float         realTime      = bpmchangeData.bpmChangeStartTime + beatmapDataLoader.GetRealTimeFromBPMTime(time - bpmchangeData.bpmChangeStartBPMTime, bpmchangeData.bpm, shuffle, shufflePeriod);

                customEvents.Add(new CustomEventData(realTime, customEventData.type, customEventData.data ?? Tree()));
            }
            customEvents = customEvents.OrderBy(x => x.time).ToList();
            var data = new BeatmapData(beatmapLineData.Length);

            data.SetField("_beatmapLinesData", beatmapLineData);
            foreach (var d in beatmapEventData)
            {
                data.AddBeatmapEventData(d);
            }
            return(new CustomBeatmapData(data, customEvents.ToArray(), customBeatmapSaveData.customData ?? Tree(), Tree(), Tree()));
        }
        public static bool Prefix(BeatmapDataLoader __instance, string json, float startBPM, float shuffle, float shufflePeriod, ref BeatmapData __result)
        {
            //Plugin.logger.Debug("In GetBeatmapDataFromJson");

            CustomBeatmapSaveData saveData = CustomBeatmapSaveData.DeserializeFromJSONString(json);

            if (saveData == null)
            {
                return(true);
            }

            __result = CustomBeatmapDataLoader.GetBeatmapDataFromBeatmapSaveData(saveData.notes, saveData.obstacles, saveData.events, startBPM, shuffle, shufflePeriod, saveData.customEvents ?? new List <CustomBeatmapSaveData.CustomEventData>(), Tree(), Tree(), __instance);
            if (!(__result is CustomBeatmapData))
            {
                return(true);
            }

            CustomBeatmapData beatmapData = __result as CustomBeatmapData;

            return(false);
        }
コード例 #3
0
        static bool Prefix(string customLevelPath, string difficultyFileName, StandardLevelInfoSaveData standardLevelInfoSaveData, ref BeatmapData __result)
        {
            string path = Path.Combine(customLevelPath, difficultyFileName);

            if (File.Exists(path))
            {
                string json = File.ReadAllText(path);
                CustomBeatmapSaveData bsd = CustomBeatmapSaveData.DeserializeFromJSONString(json);
                // NOTE: logic depends on the above call always returning non-null when the vanilla version would!
                if (bsd == null)
                {
                    __result = BeatmapDataLoader.GetBeatmapDataFromJson(json, standardLevelInfoSaveData.beatsPerMinute, standardLevelInfoSaveData.shuffle, standardLevelInfoSaveData.shufflePeriod);
                }
                else if (standardLevelInfoSaveData is CustomLevelInfoSaveData lisd)
                {
                    __result = CustomBeatmapDataLoader.GetBeatmapDataFromBeatmapSaveData(bsd.notes, bsd.obstacles, bsd.events, lisd.beatsPerMinute, lisd.shuffle, lisd.shufflePeriod, bsd.customEvents ?? new List <CustomBeatmapSaveData.CustomEventData>(), at(lisd.beatmapCustomDatasByFilename, difficultyFileName) ?? Tree(), lisd.customData ?? Tree());
                }
                else
                {
                    __result = CustomBeatmapDataLoader.GetBeatmapDataFromBeatmapSaveData(bsd.notes, bsd.obstacles, bsd.events, standardLevelInfoSaveData.beatsPerMinute, standardLevelInfoSaveData.shuffle, standardLevelInfoSaveData.shufflePeriod, bsd.customEvents ?? new List <CustomBeatmapSaveData.CustomEventData>(), Tree(), Tree());
                }
            }
            return(false);
        }
コード例 #4
0
        // Token: 0x0600125F RID: 4703 RVA: 0x000404A0 File Offset: 0x0003E6A0
        public static CustomBeatmapData GetBeatmapDataFromBeatmapSaveData(List <CustomBeatmapSaveData.NoteData> notesSaveData, List <CustomBeatmapSaveData.ObstacleData> obstaclesSaveData,
                                                                          List <CustomBeatmapSaveData.EventData> eventsSaveData, float startBPM, float shuffle, float shufflePeriod,
                                                                          List <CustomBeatmapSaveData.CustomEventData> customEventsSaveData, dynamic customData, dynamic customLevelData,
                                                                          BeatmapDataLoader beatmapDataLoader)
        {
            try
            {
                // IPA's reflectionutil sucks
                object     _notesInTimeRowProcessor   = beatmapDataLoader.GetType().GetField("_notesInTimeRowProcessor", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(beatmapDataLoader);
                MethodInfo ProcessBasicNotesInTimeRow = _notesInTimeRowProcessor.GetType().GetMethod("ProcessBasicNotesInTimeRow", BindingFlags.Instance | BindingFlags.Public);
                MethodInfo ProcessNotesInTimeRow      = _notesInTimeRowProcessor.GetType().GetMethod("ProcessNotesInTimeRow", BindingFlags.Instance | BindingFlags.Public);

                // remainder of this method copied from SongLoaderPlugin@12de0cf, with changes:
                // BeatmapData, NoteData, EventData, and ObstacleData replaced with their Custom counterparts
                // customData fields propagated to new objects
                List <BeatmapObjectData>[] array = new List <BeatmapObjectData> [4];
                List <BeatmapEventData>    list  = new List <BeatmapEventData>(eventsSaveData.Count);
                List <BPMChangeData>       list2 = new List <BPMChangeData>();
                list2.Add(new BPMChangeData(0f, 0f, startBPM));
                BPMChangeData bpmchangeData = list2[0];
                foreach (CustomBeatmapSaveData.EventData eventData in eventsSaveData)
                {
                    if (eventData.type.IsBPMChangeEvent())
                    {
                        float time  = eventData.time;
                        int   value = eventData.value;
                        float bpmChangeStartTime = bpmchangeData.bpmChangeStartTime + beatmapDataLoader.GetRealTimeFromBPMTime(time - bpmchangeData.bpmChangeStartBPMTime, (float)value, shuffle, shufflePeriod);
                        list2.Add(new BPMChangeData(bpmChangeStartTime, time, (float)value));
                    }
                }
                for (int i = 0; i < 4; i++)
                {
                    array[i] = new List <BeatmapObjectData>(3000);
                }
                int   num  = 0;
                float num2 = -1f;
                List <CustomNoteData> list3 = new List <CustomNoteData>(4);
                List <CustomNoteData> list4 = new List <CustomNoteData>(4);
                int num3 = 0;
                foreach (CustomBeatmapSaveData.NoteData noteData in notesSaveData)
                {
                    float time2 = noteData.time;
                    while (num3 < list2.Count - 1 && list2[num3 + 1].bpmChangeStartBPMTime < time2)
                    {
                        num3++;
                    }
                    BPMChangeData    bpmchangeData2     = list2[num3];
                    float            num4               = bpmchangeData2.bpmChangeStartTime + beatmapDataLoader.GetRealTimeFromBPMTime(time2 - bpmchangeData2.bpmChangeStartBPMTime, bpmchangeData2.bpm, shuffle, shufflePeriod);
                    int              lineIndex          = noteData.lineIndex;
                    NoteLineLayer    lineLayer          = noteData.lineLayer;
                    NoteLineLayer    startNoteLineLayer = NoteLineLayer.Base;
                    NoteType         type               = noteData.type;
                    NoteCutDirection cutDirection       = noteData.cutDirection;
                    if (list3.Count > 0 && list3[0].time < num4 - 0.001f && type.IsBasicNote())
                    {
                        ProcessBasicNotesInTimeRow.Invoke(_notesInTimeRowProcessor, new object[] { list3.Cast <NoteData>().ToList(), num4 });
                        num2 = list3[0].time;
                        list3.Clear();
                    }
                    if (list4.Count > 0 && list4[0].time < num4 - 0.001f)
                    {
                        ProcessNotesInTimeRow.Invoke(_notesInTimeRowProcessor, new object[] { list4.Cast <NoteData>().ToList() });
                        list4.Clear();
                    }
                    CustomNoteData noteData2 = new CustomNoteData(num++, num4, lineIndex, lineLayer, startNoteLineLayer, type, cutDirection, float.MaxValue, num4 - num2, noteData._customData ?? Tree());
                    int            lineNum   = lineIndex > 3 ? 3 : lineIndex < 0 ? 0 : lineIndex;
                    array[lineNum].Add(noteData2);
                    CustomNoteData item = noteData2;
                    if (noteData2.noteType.IsBasicNote())
                    {
                        list3.Add(item);
                    }
                    list4.Add(item);
                }
                ProcessBasicNotesInTimeRow.Invoke(_notesInTimeRowProcessor, new object[] { list3.Cast <NoteData>().ToList(), float.MaxValue });
                ProcessNotesInTimeRow.Invoke(_notesInTimeRowProcessor, new object[] { list4.Cast <NoteData>().ToList() });
                num3 = 0;
                foreach (CustomBeatmapSaveData.ObstacleData obstacleData in obstaclesSaveData)
                {
                    float time3 = obstacleData.time;
                    while (num3 < list2.Count - 1 && list2[num3 + 1].bpmChangeStartBPMTime < time3)
                    {
                        num3++;
                    }
                    BPMChangeData      bpmchangeData3      = list2[num3];
                    float              time4               = bpmchangeData3.bpmChangeStartTime + beatmapDataLoader.GetRealTimeFromBPMTime(time3 - bpmchangeData3.bpmChangeStartBPMTime, bpmchangeData3.bpm, shuffle, shufflePeriod);
                    int                lineIndex2          = obstacleData.lineIndex;
                    ObstacleType       type2               = obstacleData.type;
                    float              realTimeFromBPMTime = beatmapDataLoader.GetRealTimeFromBPMTime(obstacleData.duration, startBPM, shuffle, shufflePeriod);
                    int                width               = obstacleData.width;
                    CustomObstacleData item2               = new CustomObstacleData(num++, time4, lineIndex2, type2, realTimeFromBPMTime, width, obstacleData._customData ?? Tree());
                    int                lineNum             = lineIndex2 > 3 ? 3 : lineIndex2 < 0 ? 0 : lineIndex2;
                    array[lineNum].Add(item2);
                }
                foreach (CustomBeatmapSaveData.EventData eventData2 in eventsSaveData)
                {
                    float time5 = eventData2.time;
                    while (num3 < list2.Count - 1 && list2[num3 + 1].bpmChangeStartBPMTime < time5)
                    {
                        num3++;
                    }
                    BPMChangeData    bpmchangeData4 = list2[num3];
                    float            time6          = bpmchangeData4.bpmChangeStartTime + beatmapDataLoader.GetRealTimeFromBPMTime(time5 - bpmchangeData4.bpmChangeStartBPMTime, bpmchangeData4.bpm, shuffle, shufflePeriod);
                    BeatmapEventType type3          = eventData2.type;
                    int value2 = eventData2.value;
                    CustomBeatmapEventData item3 = new CustomBeatmapEventData(time6, type3, value2, eventData2.customData ?? Tree());
                    list.Add(item3);
                }
                if (list.Count == 0)
                {
                    list.Add(new CustomBeatmapEventData(0f, BeatmapEventType.Event0, 1, Tree()));
                    list.Add(new CustomBeatmapEventData(0f, BeatmapEventType.Event4, 1, Tree()));
                }
                var customEvents = new Dictionary <string, List <CustomEventData> >(customEventsSaveData.Count);
                foreach (CustomBeatmapSaveData.CustomEventData customEventData in customEventsSaveData)
                {
                    if (!customEvents.ContainsKey(customEventData.type))
                    {
                        customEvents[customEventData.type] = new List <CustomEventData>();
                    }
                    float time7 = customEventData.time;
                    while (num3 < list2.Count - 1 && list2[num3 + 1].bpmChangeStartBPMTime < time7)
                    {
                        num3++;
                    }
                    BPMChangeData bpmchangeData5 = list2[num3];
                    float         time8          = bpmchangeData5.bpmChangeStartTime + beatmapDataLoader.GetRealTimeFromBPMTime(time7 - bpmchangeData5.bpmChangeStartBPMTime, bpmchangeData5.bpm, shuffle, shufflePeriod);
                    customEvents[customEventData.type].Add(new CustomEventData(time8, customEventData.type, customEventData.data ?? Tree()));
                }
                foreach (var pair in customEvents)
                {
                    pair.Value.Sort((x, y) => x.time.CompareTo(y.time));
                }
                BeatmapLineData[] array2 = new BeatmapLineData[4];
                for (int j = 0; j < 4; j++)
                {
                    array[j].Sort(delegate(BeatmapObjectData x, BeatmapObjectData y)
                    {
                        if (x.time == y.time)
                        {
                            return(0);
                        }
                        return((x.time <= y.time) ? -1 : 1);
                    });
                    array2[j] = new BeatmapLineData();
                    array2[j].beatmapObjectsData = array[j].ToArray();
                }
                return(new CustomBeatmapData(array2, list.ToArray(), customEvents, customData, customLevelData));
            } catch (Exception e)
            {
                Plugin.logger.Critical("Exception loading CustomBeatmap!");
                Plugin.logger.Critical(e);
                Debug.LogError("Exception loading CustomBeatmap!");
                Debug.LogError(e);
                throw e;
            }
        }
コード例 #5
0
        static bool Prefix(BeatmapDataLoader ____beatmapDataLoader, string customLevelPath, string difficultyFileName, StandardLevelInfoSaveData standardLevelInfoSaveData, ref BeatmapData __result)
        {
            //Plugin.logger.Debug("In LoadBeatmapDataBeatmapData");
            string path = Path.Combine(customLevelPath, difficultyFileName);

            //Plugin.logger.Debug("Loading " + standardLevelInfoSaveData.songName + " (" + path + ")");
            if (File.Exists(path))
            {
                string json = File.ReadAllText(path);
                CustomBeatmapSaveData bsd = CustomBeatmapSaveData.DeserializeFromJSONString(json);
                // NOTE: logic depends on the above call always returning non-null when the vanilla version would!
                if (bsd == null)
                {
                    //Plugin.logger.Debug("CustomBeatmapSaveData was null; falling back to BeatmapDataLoader.GetBeatmapDataFromJson");
                    __result = ____beatmapDataLoader.GetBeatmapDataFromJson(json, standardLevelInfoSaveData.beatsPerMinute, standardLevelInfoSaveData.shuffle, standardLevelInfoSaveData.shufflePeriod);
                }
                else if (standardLevelInfoSaveData is CustomLevelInfoSaveData lisd)
                {
                    //Plugin.logger.Debug("Loaded CustomBeatmapSaveData with CustomLevelInfoSaveData");
                    __result = CustomBeatmapDataLoader.GetBeatmapDataFromBeatmapSaveData(bsd.notes, bsd.obstacles, bsd.events, lisd.beatsPerMinute, lisd.shuffle, lisd.shufflePeriod, bsd.customEvents ?? new List <CustomBeatmapSaveData.CustomEventData>(), at(lisd.beatmapCustomDatasByFilename, difficultyFileName) ?? Tree(), lisd.customData ?? Tree(), ____beatmapDataLoader);
                }
                else
                {
                    //Plugin.logger.Debug("Loaded CustomBeatmapSaveData with StandardLevelInfoSaveData");
                    __result = CustomBeatmapDataLoader.GetBeatmapDataFromBeatmapSaveData(bsd.notes, bsd.obstacles, bsd.events, standardLevelInfoSaveData.beatsPerMinute, standardLevelInfoSaveData.shuffle, standardLevelInfoSaveData.shufflePeriod, bsd.customEvents ?? new List <CustomBeatmapSaveData.CustomEventData>(), Tree(), Tree(), ____beatmapDataLoader);
                }

                /*
                 * if (__result is CustomBeatmapData beatmapData)
                 * {
                 *  foreach (var line in beatmapData.beatmapLinesData)
                 *  {
                 *      foreach (var obj in line.beatmapObjectsData)
                 *      {
                 *          if (obj is CustomObstacleData obs)
                 *          {
                 *              Plugin.logger.Debug("Custom obstacle at " + obs.time);
                 *              Plugin.logger.Debug("Data:");
                 *              foreach (var pair in (IDictionary<string, object>)obs.customData)
                 *              {
                 *                  Plugin.logger.Debug("      \"" + pair.Key + "\": " + pair.Value);
                 *              }
                 *          }
                 *          else if (obj is ObstacleData ob)
                 *          {
                 *              Plugin.logger.Debug("Non-custom obstacle at " + ob.time);
                 *          }
                 *          if (obj is CustomNoteData n)
                 *          {
                 *              Plugin.logger.Debug("Custom note at " + n.time);
                 *              Plugin.logger.Debug("Data:");
                 *              foreach (var pair in (IDictionary<string, object>)n.customData)
                 *              {
                 *                  Plugin.logger.Debug("      \"" + pair.Key + "\": " + pair.Value);
                 *              }
                 *          }
                 *          else if (obj is NoteData no)
                 *          {
                 *              Plugin.logger.Debug("Non-custom note at " + no.time);
                 *          }
                 *      }
                 *  }
                 *  foreach (var pair in beatmapData.customEventData)
                 *  {
                 *      Plugin.logger.Debug("Custom event \"" + pair.Key + "\":");
                 *      foreach (var e in pair.Value)
                 *      {
                 *          Plugin.logger.Debug("    " + e.time + ":");
                 *          foreach (var innerPair in (IDictionary<string, object>)e.data)
                 *          {
                 *              Plugin.logger.Debug("        \"" + innerPair.Key + "\": " + innerPair.Value);
                 *          }
                 *      }
                 *  }
                 * }
                 */
            }
            return(false);
        }
        static bool Prefix(ref BeatmapDataLoader __instance, List <BeatmapSaveData.NoteData> notesSaveData, List <BeatmapSaveData.ObstacleData> obstaclesSaveData, List <BeatmapSaveData.EventData> eventsSaveData, float startBPM, float shuffle, float shufflePeriod, ref Object ____notesInTimeRowProcessor, ref BeatmapData __result)
        {
            List <BeatmapObjectData>[] array = new List <BeatmapObjectData> [4];
            List <BeatmapEventData>    list  = new List <BeatmapEventData>(eventsSaveData.Count);
            List <BPMChangeData>       list2 = new List <BPMChangeData>();

            list2.Add(new BPMChangeData(0f, 0f, startBPM));
            BPMChangeData bpmchangeData = list2[0];

            foreach (BeatmapSaveData.EventData eventData in eventsSaveData)
            {
                if (eventData.type.IsBPMChangeEvent())
                {
                    float time  = eventData.time;
                    int   value = eventData.value;
                    float bpmChangeStartTime = bpmchangeData.bpmChangeStartTime + __instance.GetRealTimeFromBPMTime(time - bpmchangeData.bpmChangeStartBPMTime, (float)value, shuffle, shufflePeriod);
                    list2.Add(new BPMChangeData(bpmChangeStartTime, time, (float)value));
                }
            }
            for (int i = 0; i < 4; i++)
            {
                array[i] = new List <BeatmapObjectData>(3000);
            }
            int             num   = 0;
            float           num2  = -1f;
            List <NoteData> list3 = new List <NoteData>(4);
            List <NoteData> list4 = new List <NoteData>(4);
            int             num3  = 0;

            foreach (BeatmapSaveData.NoteData noteData in notesSaveData)
            {
                float time2 = noteData.time;
                while (num3 < list2.Count - 1 && list2[num3 + 1].bpmChangeStartBPMTime < time2)
                {
                    num3++;
                }
                BPMChangeData    bpmchangeData2     = list2[num3];
                float            num4               = bpmchangeData2.bpmChangeStartTime + __instance.GetRealTimeFromBPMTime(time2 - bpmchangeData2.bpmChangeStartBPMTime, bpmchangeData2.bpm, shuffle, shufflePeriod);
                int              lineIndex          = noteData.lineIndex;
                NoteLineLayer    lineLayer          = noteData.lineLayer;
                NoteLineLayer    startNoteLineLayer = NoteLineLayer.Base;
                NoteType         type               = noteData.type;
                NoteCutDirection cutDirection       = noteData.cutDirection;
                if (list3.Count > 0 && list3[0].time < num4 - 0.001f && type.IsBasicNote())
                {
                    ____notesInTimeRowProcessor.InvokeMethod("ProcessBasicNotesInTimeRow", list3, num4);
                    num2 = list3[0].time;
                    list3.Clear();
                }
                if (list4.Count > 0 && list4[0].time < num4 - 0.001f)
                {
                    ____notesInTimeRowProcessor.InvokeMethod("ProcessNotesInTimeRow", list4);
                    list4.Clear();
                }
                NoteData noteData2 = new NoteData(num++, num4, lineIndex, lineLayer, startNoteLineLayer, type, cutDirection, float.MaxValue, num4 - num2);
                int      lineNum   = lineIndex > 3 ? 3 : lineIndex < 0 ? 0 : lineIndex;
                array[lineNum].Add(noteData2);
                NoteData item = noteData2;
                if (noteData2.noteType.IsBasicNote())
                {
                    list3.Add(item);
                }
                list4.Add(item);
            }
            ____notesInTimeRowProcessor.InvokeMethod("ProcessBasicNotesInTimeRow", list3, float.MaxValue);
            ____notesInTimeRowProcessor.InvokeMethod("ProcessNotesInTimeRow", list4);
            num3 = 0;
            foreach (BeatmapSaveData.ObstacleData obstacleData in obstaclesSaveData)
            {
                float time3 = obstacleData.time;
                while (num3 < list2.Count - 1 && list2[num3 + 1].bpmChangeStartBPMTime < time3)
                {
                    num3++;
                }
                BPMChangeData bpmchangeData3      = list2[num3];
                float         time4               = bpmchangeData3.bpmChangeStartTime + __instance.GetRealTimeFromBPMTime(time3 - bpmchangeData3.bpmChangeStartBPMTime, bpmchangeData3.bpm, shuffle, shufflePeriod);
                int           lineIndex2          = obstacleData.lineIndex;
                ObstacleType  type2               = obstacleData.type;
                float         realTimeFromBPMTime = __instance.GetRealTimeFromBPMTime(obstacleData.duration, startBPM, shuffle, shufflePeriod);
                int           width               = obstacleData.width;
                ObstacleData  item2               = new ObstacleData(num++, time4, lineIndex2, type2, realTimeFromBPMTime, width);
                int           lineNum             = lineIndex2 > 3 ? 3 : lineIndex2 < 0 ? 0 : lineIndex2;
                array[lineNum].Add(item2);
            }
            foreach (BeatmapSaveData.EventData eventData2 in eventsSaveData)
            {
                float time5 = eventData2.time;
                while (num3 < list2.Count - 1 && list2[num3 + 1].bpmChangeStartBPMTime < time5)
                {
                    num3++;
                }
                BPMChangeData    bpmchangeData4 = list2[num3];
                float            time6          = bpmchangeData4.bpmChangeStartTime + __instance.GetRealTimeFromBPMTime(time5 - bpmchangeData4.bpmChangeStartBPMTime, bpmchangeData4.bpm, shuffle, shufflePeriod);
                BeatmapEventType type3          = eventData2.type;
                int value2             = eventData2.value;
                BeatmapEventData item3 = new BeatmapEventData(time6, type3, value2);
                list.Add(item3);
            }
            if (list.Count == 0)
            {
                list.Add(new BeatmapEventData(0f, BeatmapEventType.Event0, 1));
                list.Add(new BeatmapEventData(0f, BeatmapEventType.Event4, 1));
            }
            BeatmapLineData[] array2 = new BeatmapLineData[4];
            for (int j = 0; j < 4; j++)
            {
                array[j].Sort(delegate(BeatmapObjectData x, BeatmapObjectData y)
                {
                    if (x.time == y.time)
                    {
                        return(0);
                    }
                    if (x.time <= y.time)
                    {
                        return(-1);
                    }
                    return(1);
                });
                array2[j] = new BeatmapLineData();
                array2[j].beatmapObjectsData = array[j].ToArray();
            }
            __result = new BeatmapData(array2, list.ToArray());
            return(false);
        }