/// <summary> /// 在一次「浮生孰来」活动祈愿中抽中「甘雨」和「刻晴」 /// </summary> /// <param name="datas"></param> /// <param name="infos"></param> private static void 心甘晴愿(List <WishData> datas, List <AchievementInfo> infos) { var events = WishEventList.FindAll(x => x.Name == "浮生孰来"); foreach (var item in events) { var list = datas.Where(x => x.Time >= item.StartTime && x.Time <= item.EndTime); list = list.Where(x => x.Name == "甘雨" || x.Name == "刻晴").Select(x => x); bool hasGanyu = false, hasKeqing = false; foreach (var data in list) { if (data.Name == "甘雨") { hasGanyu = true; } else { hasKeqing = true; } if (hasGanyu && hasKeqing) { var info = new AchievementInfo { Name = "心甘晴愿", Description = "在一次「浮生孰来」活动祈愿中抽中「甘雨」和「刻晴」", IsFinished = true, FinishTime = data.Time, }; infos.Add(info); break; } } } }
/// <summary> /// 在一次「赤团开时」活动祈愿中获取三个胡桃 /// </summary> /// <param name="datas"></param> /// <param name="infos"></param> private static void 个胡桃(List <WishData> datas, List <AchievementInfo> infos) { var events = WishEventList.FindAll(x => x.Name == "赤团开时"); foreach (var item in events) { var list = datas.Where(x => x.Time >= item.StartTime && x.Time <= item.EndTime).Select(x => x); list = list.Where(x => x.Name == "胡桃").Select(x => x); if (list.Count() >= 3) { var info = new AchievementInfo { Name = "一个胡桃,两个胡桃,三个胡桃", Description = "在一次「赤团开时」活动祈愿中获取三个胡桃", IsFinished = true, FinishTime = list.ElementAt(2).Time, Total = $"总计 {list.Count()}", }; infos.Add(info); } } }