示例#1
0
    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;
            }
        }
    }
示例#2
0
    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);
    }
示例#3
0
    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);
    }
示例#4
0
    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);
    }
示例#5
0
 public ActivityDrawCardVo(ActivityMissionRulePB rule, UserActivityMissionPB userPb)
 {
     this._rule   = rule;
     this._userPb = userPb;
 }