static bool Prefix(ActorMenu __instance, int key) { if (!Main.enabled || Main.settings.showAllMassage) { return(true); } if (!DateFile.instance.actorLifeMassage.ContainsKey(key)) { return(true); } int backupId = Changer.GetBackupId(); //Main.Logger.Log("Pre-----" + changer.getActorName(key)); if (backupId == key) { return(true); } if (backupId != 0) { //Main.Logger.Log("reset-----" + changer.getActorName(key) + "Count:" + DateFile.instance.actorLifeMassage[key].Count); DateFile.instance.actorLifeMassage[backupId] = Changer.GetBackupMassage(); Changer.ResetBackup(); } List <int[]> newLifeMassage = new List <int[]> { }; Changer.BackupMassage(key); //Main.Logger.Log("setp1" + changer.getActorName(key)); int count = DateFile.instance.actorLifeMassage[key].Count; //Main.Logger.Log("setp2:MaxCount:" + count); //Main.Logger.Log("setp3:showCount:" + tlist.Count); for (int i = 0; i < count; i++) { //Main.Logger.Log("setp4:" + i); int messageTyp = DateFile.instance.actorLifeMassage[key][i][0]; //Main.Logger.Log($"messageTyp: {messageTyp}"); //根据经历类型ID进行筛选 if (Changer.MessageTypToShow(messageTyp)) { newLifeMassage.Add(DateFile.instance.actorLifeMassage[key][i]); //Main.Logger.Log("setp6:" + tlist[j]); } } DateFile.instance.actorLifeMassage[key] = newLifeMassage; return(true); }