diff --git a/Unlockers/UnlockGameEvents/MU3.Client/patch_PacketGetGameEvent.cs b/Unlockers/UnlockGameEvents/MU3.Client/patch_PacketGetGameEvent.cs index e348ecd..98fb7cd 100644 --- a/Unlockers/UnlockGameEvents/MU3.Client/patch_PacketGetGameEvent.cs +++ b/Unlockers/UnlockGameEvents/MU3.Client/patch_PacketGetGameEvent.cs @@ -22,9 +22,10 @@ class patch_PacketGetGameEvent: Packet { idPeriod.period.endDate = endDate; } } else { - idPeriod = new(); - idPeriod.id = eventData.id; - idPeriod.period = new Period(DateTime.MinValue.Date, endDate); + idPeriod = new() { + id = eventData.id, + period = new Period(DateTime.MinValue.Date, endDate) + }; _gameEvent.list.Add(idPeriod); _gameEvent.lastUpdate = CustomDateTime.Now; } diff --git a/Unlockers/UnlockMemoryChapters/MU3.Client/patch_PacketGetUserMemoryChapter.cs b/Unlockers/UnlockMemoryChapters/MU3.Client/patch_PacketGetUserMemoryChapter.cs index 59f9f26..ec1fa24 100644 --- a/Unlockers/UnlockMemoryChapters/MU3.Client/patch_PacketGetUserMemoryChapter.cs +++ b/Unlockers/UnlockMemoryChapters/MU3.Client/patch_PacketGetUserMemoryChapter.cs @@ -13,7 +13,7 @@ class patch_PacketGetUserMemoryChapter: Packet { case State.Done: { GetUserMemoryChapterResponse response_ = (query_ as GetUserMemoryChapter).response_; foreach(MemoryChapterData memoryChapterData in SingletonStateMachine.instance.allMemoryChapterData) { - UserMemoryChapter userMemoryChapter = Enumerable.FirstOrDefault(response_.userMemoryChapterList, (UserMemoryChapter c) => c.chapterId == memoryChapterData.id); + UserMemoryChapter userMemoryChapter = Enumerable.FirstOrDefault(response_.userMemoryChapterList ?? [], (UserMemoryChapter c) => c.chapterId == memoryChapterData.id); if(userMemoryChapter != null) { User.UserMemoryChapter userMemoryChapter2 = new User.UserMemoryChapter(); userMemoryChapter2.copyFrom(userMemoryChapter);