Ejemplo n.º 1
0
    /// <summary>
    /// 生日任务奖励回包
    /// </summary>
    /// <param name="res"></param>
    private void OnGetAwardCallBack(MissionAwardsRes res)
    {
        LoadingOverlay.Instance.Hide();
        RewardUtil.AddReward(res.Awards);

        FlowText.ShowMessage(I18NManager.Get("Task_ReceiveRewardSuccess"));

        //刷新数据
        _missionModel.UpdateUserMission(res.UserMission);
        _missionModel.UpdateUserMissionInfo(res.UserMissionInfo);
        _missionModel.UpdateUserPlayerBirthdayMission(res.UserMission, _missionModel.PlayerBirthdayMissionsDay);


        View.SetData(_missionModel, _missionModel.PlayerBirthdayMissionsDay);
    }
Ejemplo n.º 2
0
        private void OnGetAwardCallBack(MissionAwardsRes res)
        {
            LoadingOverlay.Instance.Hide();
            _missionModel.ReplaceUserMission(res.UserMission, _replaceId);
//            _missionModel.UserMissionList.Sort();
            RewardUtil.AddReward(res.Awards);
            //领取奖励后要根据规则刷新道具之类的。
            _missionModel.UpdateUserMissionInfo(res.UserMissionInfo);
            View.SetData(_missionModel, (int)_curPlayerPb);
            FlowText.ShowMessage(I18NManager.Get("Task_ReceiveRewardSuccess"));
            foreach (var award in res.Awards)
            {
                if (award.Resource == ResourcePB.Gem)
                {
                    SdkHelper.StatisticsAgent.OnReward(award.Num, "星路里程");
                }
            }
            SendMessage(new Message(MessageConst.TO_GUIDE_ACHIEVEMENT_NEXT_STEP));
        }
Ejemplo n.º 3
0
    private void UpdateStarActivityRefresh(int obj)
    {
        var refreshTimeStamp = _missionModel.GetStarActivityRefreshTimePintList()[_missionModel.GetOpenDay()];
        var curTimeStamp     = ClientTimer.Instance.GetCurrentTimeStamp();
        var overTimeStamp    = _missionModel.GetStarActivityOverTimeStamp();

        if (curTimeStamp == overTimeStamp)
        {
            ModuleManager.Instance.GoBack();
            return;
        }
        if (refreshTimeStamp == curTimeStamp)
        {
            MissionRefreshReq req = new MissionRefreshReq();
            var data = NetWorkManager.GetByteData(req);
            NetWorkManager.Instance.Send <MissionRefreshRes>(CMD.MISSION_REFRESH, data, res =>
            {
                _missionModel.UpdateUserMissionInfo(res.UserMissionInfo);
                _missionModel.UpdateStarActivityMission(res.UserMissions);
                View.SetData(_missionModel, _missionModel.Day);
            });
        }
    }
Ejemplo n.º 4
0
        private void OnGetAwardCallBack(MissionAwardsRes res)
        {
            LoadingOverlay.Instance.Hide();
//            Debug.LogError(res.UserMission);
            //Debug.LogError(res.UserMission);
            _missionModel.UpdateUserMission(res.UserMission);
            //Debug.LogError(res.StarCourseSchedule.Count);
//        _missionModel.UpdateStarCourse(res.StarCourseSchedule);

            _missionModel.UserMissionList.Sort();
            RewardUtil.AddReward(res.Awards);
            //领取奖励后要根据规则刷新道具之类的。
            _missionModel.UpdateUserMissionInfo(res.UserMissionInfo);
            View.SetMissionItemData(_missionModel);
            if (curMissionTypePb == MissionTypePB.Daily)
            {
                View.SetDailyMissionInfo();
            }
            else
            {
                View.SetWeekMissionInfo();
            }
            FlowText.ShowMessage(I18NManager.Get("Task_ReceiveRewardSuccess"));
            foreach (var award in res.Awards)
            {
                if (award.Resource == ResourcePB.Gem)
                {
                    SdkHelper.StatisticsAgent.OnReward(award.Num, "任务");
                }
            }

            if (GlobalData.PlayerModel.PlayerVo.Level == 4)
            {
                GuideManager.SetStatisticsRemoteGuideStep(GuideConst.MainLineStep_Mission_Reward);
            }
        }