static void Prefix(UIDate __instance) { if (!Main.enabled || !Main.settings.mergeIcon) { return; } if (int.Parse(DateFile.instance.partWorldMapDate[DateFile.instance.mianPartId][101]) == 0) { __instance.changTrunEvents.Clear(); } if (__instance.changTrunEvents.Count <= 0) { __instance.changTrunEvents.Add(new int[1]); } List <int[]> newEventList = new List <int[]>(); bool isAdded = false; Changer changer = new Changer(); changer.resetPlaceIds(); for (int i = __instance.changTrunEvents.Count - 1; i > 0; i--) { int num2 = __instance.changTrunEvents[i][0]; int num3 = int.Parse(DateFile.instance.trunEventDate[num2][1]); if (num3 > 0 && num2 == 248) { int placeId = __instance.changTrunEvents[i][1]; string name = string.Format("TrunEventIcon,{0},{1},{2}", num2, placeId, __instance.changTrunEvents[i][2]); string[] array = name.Split(new char[] { ',' }); if (!isAdded)//仅保留一个图标 { newEventList.Add(__instance.changTrunEvents[i]); isAdded = true; } changer.addPlaceId(placeId); } else { newEventList.Add(__instance.changTrunEvents[i]); } } __instance.changTrunEvents = newEventList; }