/// <summary> /// 删除角色生平经历,只要对应内容匹配就会删掉 /// </summary> /// <param name="ActorID">被删的角色 ID</param> /// <param name="RecordType">-1 = 任意,被删掉的记录类型</param> /// <param name="ParamType">-1 = 任意,参数类型</param> /// <param name="ParamValue">必填,参数内容</param> public static void DelLifeRecord(int ActorID, int RecordType = -1, int ParamType = -1, int ParamValue = -1) { var temp = DelLifeRecord(GetLifeRecords(ActorID), RecordType, ParamType, ParamValue).ToArray(); LifeRecords.RemoveRecords(ActorID); LifeRecords.AddRecords(ActorID, temp); }
/// <summary> /// 删除角色生平经历 /// </summary> /// <param name="ActorID">被删的角色 ID</param> /// <param name="RecordType">被删掉的记录类型</param> public static void DelLifeRecord(int ActorID, int RecordType) { var records = LifeRecords.GetAllRecords(ActorID).ToList(); records.RemoveAll(i => i.messageId == RecordType); LifeRecords.RemoveRecords(ActorID); LifeRecords.AddRecords(ActorID, records.ToArray()); }
/// <summary> /// 删除角色生平经历 /// </summary> /// <param name="ActorID">被删的角色 ID</param> /// <param name="Records">被删掉的记录数组</param> public static void DelLifeRecord(int ActorID, LifeRecords.LifeRecord[] Records) { var records = LifeRecords.GetAllRecords(ActorID).ToList(); records.RemoveAll(i => Records.Contains(i)); LifeRecords.RemoveRecords(ActorID); LifeRecords.AddRecords(ActorID, records.ToArray()); }