1
0
forked from akanyan/mu3-mods

fix(UnlockGameEvents): rework mission event cycling

* Iterate in reverse, from latest to oldest.
* Unlock all missions again, unless the server has returned
  exactly one active mission and that mission is present
  on the client's machine..
This commit is contained in:
2025-01-24 20:20:37 +00:00
parent 40484bc94a
commit fefadfc243
2 changed files with 27 additions and 6 deletions

View File

@ -2,6 +2,7 @@
using MU3.User;
using MU3.Util;
using System.Collections.Generic;
using System.Linq;
namespace MU3.Operation;
@ -20,7 +21,7 @@ class patch_OperationManager: OperationManager {
private MissionEventData overrideMission(MissionEventData orig) {
if(orig != null) {
foreach(KeyValuePair<int, MissionEventData> item in _missionEventDataMap) {
foreach(KeyValuePair<int, MissionEventData> item in _missionEventDataMap.Reverse()) {
MissionEventData value = item.Value;
if(!value.isMissionEventActive || value.eventData == null) {
continue;