public void UpDataActivityMission(ActivityType type, UserActivityMissionPB pb) { var value = _activityListDic[type].UserActivityMissions; foreach (var t in value) { if (t.ActivityId == pb.ActivityId && t.ActivityMissionId == pb.ActivityMissionId) { t.Status = pb.Status; t.Progress = pb.Progress; t.Finish = pb.Finish; } } }
public ActivityMissionVo(ActivityMissionRulePB rule, UserActivityMissionPB userInfo) { ActivityMissionId = rule.ActivityMissionId; ActivityMissionName = rule.ActivityMissionName; ActivityId = rule.ActivityId; InitReward(rule.Award.ToList()); ActivityMissionDesc = rule.ActivityMissionDesc; JumpTo = rule.JumpTo; Extra = rule.Extra; Status = userInfo.Status; Progress = userInfo.Progress; Finish = userInfo.Finish; UpdateMissionPro(Status); }
public List <ActivityDrawCardVo> GetActivityVo() { List <ActivityDrawCardVo> vos = new List <ActivityDrawCardVo>(); foreach (var v in _activityMissionRules) { UserActivityMissionPB userPb = _userActivityMissionPBs.Find((m) => { return(m.ActivityMissionId == v.ActivityMissionId); }); ActivityDrawCardVo vo = new ActivityDrawCardVo(v, userPb); vo.activity_mission_id = v.ActivityMissionId; vos.Add(vo); } return(vos); }
public void UpdateActivityMissionData(UserActivityMissionPB pb) { foreach (var t in _activityMissionUserInfo) { if (t.ActivityId == pb.ActivityId && t.ActivityMissionId == pb.ActivityMissionId) { t.Status = pb.Status; t.Progress = pb.Progress; t.Finish = pb.Finish; t.UpdateMissionPro(pb.Status); break; } } _activityMissionUserInfo.Sort((x, y) => x.MissionPro.CompareTo(y.MissionPro)); GlobalData.ActivityModel.UpDataActivityMission(_curActivity.ActivityType, pb); }
public ActivityDrawCardVo(ActivityMissionRulePB rule, UserActivityMissionPB userPb) { this._rule = rule; this._userPb = userPb; }