/// <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);
    }
        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));
        }
Exemple #3
0
    /// <summary>
    /// 星活动奖励回包
    /// </summary>
    /// <param name="res"></param>
    private void OnGetAwardCallBack(MissionAwardsRes res)
    {
        LoadingOverlay.Instance.Hide();

        foreach (var t in res.Awards)
        {
            RewardUtil.AddReward(t);
            RewardVo vo = new RewardVo(t);
            FlowText.ShowMessage(I18NManager.Get("Activity_Get", vo.Name, vo.Num));
        }


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

        //刷新UI
        View.SetData(_missionModel, _missionModel.Day);
    }
        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);
            }
        }