public void UpdateUserData(UserActivityPlotInfoPB pb) { foreach (var t in _userStoryInfo) { t.IsPass = pb.PlotIds.Contains(t.PlotId); } GlobalData.ActivityModel.UpdateActivityStory(_curActivity.ActivityType, pb); }
/// <summary> /// 更新剧情 /// </summary> /// <param name="type"></param> /// <param name="pb"></param> public void UpdateActivityStory(ActivityType type, UserActivityPlotInfoPB pb) { var value = _activityListDic[type].UserActivityPlotInfos; foreach (var t in value) { if (t.ActivityId == pb.ActivityId) { var plotIds = pb.PlotIds; foreach (var v in plotIds) { if (!t.PlotIds.Contains(v)) { t.PlotIds.Add(v); } } } } }