1
0
forked from akanyan/mu3-mods

feat(UnlockGameEvents): mission event cycling

* Makes the game use the first available non-cleared mission.
  * Rather than the first available mission period.
* No longer unlocks missions marked as expired by the server.
This commit is contained in:
2025-01-23 02:17:28 +00:00
parent d61fc96056
commit 40484bc94a
3 changed files with 44 additions and 1 deletions

View File

@ -19,6 +19,9 @@ class patch_PacketGetGameEvent: Packet {
foreach(EventData eventData in SingletonStateMachine<DataManager, DataManager.EState>.instance.allEventData) {
IdPeriod idPeriod = Enumerable.FirstOrDefault(_gameEvent.list, (IdPeriod e) => e.id == eventData.id);
if(idPeriod != null) {
if(eventData.itemType == DataStudio.EventType.MissionEvent) {
continue;
}
if(idPeriod.period.endDate < CustomDateTime.Now) {
idPeriod.period.endDate = endDate;
}